.keepedu-app-page,
.keepedu-auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: #566273;
}

.keepedu-app-page {
    background: #dedede;
}

.keepedu-app-page .topbar {
    display: none;
}

.ke-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 28px;
    background: #060606;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-header-left,
.ke-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ke-header-left {
    transition: gap 0.32s cubic-bezier(0.4, 0, 0.2, 1), width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    min-width: 0;
}

.ke-logo-icon {
    height: 32px;
    width: 32px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition:
        width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
}

.ke-logo-brand {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    opacity: 1;
    transition:
        max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease,
        margin 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-logo-mark {
    width: 36px;
    height: 36px;
    border: 3px solid #ffffff;
    border-radius: 9px;
    position: relative;
    flex: 0 0 auto;
}

.ke-logo-mark::before,
.ke-logo-mark::after {
    content: "";
    position: absolute;
    background: #ffffff;
    border-radius: 999px;
}

.ke-logo-mark::before {
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 4px;
}

.ke-logo-mark::after {
    left: 10px;
    top: 9px;
    width: 16px;
    height: 4px;
    transform: rotate(-34deg);
    transform-origin: left center;
}

.ke-header-menu {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #ffffff;
    position: relative;
    cursor: default;
    flex: 0 0 auto;
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), height 0.32s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.ke-header-menu::before,
.ke-header-menu::after,
.ke-header-menu span {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), top 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.ke-header-menu::before {
    top: 13px;
}

.ke-header-menu span {
    top: 20px;
}

.ke-header-menu::after {
    top: 27px;
}

.ke-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: #ffffff;
    text-decoration: none;
    border: 0;
    background: transparent;
    max-width: min(420px, 42vw);
    cursor: default;
}

.ke-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.ke-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ke-header-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 4px;
}

.ke-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: calc(100vh - 84px);
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-sidebar {
    background: #f6f6f6;
    border-right: 1px solid #d6d9dd;
    padding: 22px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 84px);
}

.ke-sidebar-title {
    padding: 0 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2b2f36;
    max-height: 24px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-nav {
    display: grid;
    gap: 2px;
}

.ke-nav-lote {
    display: grid;
    gap: 2px;
    overflow: hidden;
}

.ke-nav-lote.is-expanded .ke-nav-item {
    animation: ke-nav-lote-in 0.32s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(1) {
    animation-delay: 0.04s;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(2) {
    animation-delay: 0.09s;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(3) {
    animation-delay: 0.14s;
}

@keyframes ke-nav-lote-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ke-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 20px;
    color: #646f80;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1), gap 0.32s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-nav-item > span:not(.ke-nav-icon) {
    overflow: hidden;
    white-space: nowrap;
    max-width: 200px;
    opacity: 1;
    transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.ke-nav-item:hover {
    background: #ececec;
    color: #23456d;
}

.ke-nav-item.is-active {
    background: #f2f4f7;
    border-left-color: #2a84d2;
    color: #2a84d2;
}

.ke-nav-icon {
    width: 22px;
    text-align: center;
    color: inherit;
    font-size: 16px;
}

.ke-nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ke-nav-icon-svg .ke-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ke-sidebar-panel {
    margin: auto 14px 0;
    padding: 14px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d9dde4;
    max-height: 220px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, margin 0.32s cubic-bezier(0.4, 0, 0.2, 1), padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-sidebar-panel span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7d8796;
    margin-bottom: 8px;
}

.ke-sidebar-panel strong,
.ke-sidebar-panel a {
    display: block;
    color: #38516f;
    text-decoration: none;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ke-sidebar-group {
    display: grid;
    gap: 10px;
    padding: 0 14px;
}

.ke-sidebar-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a8595;
}

.ke-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #d9dde4;
    color: #4f6075;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ke-side-link:hover {
    background: #f4f8fc;
    border-color: #cad6e5;
    color: #2f5f97;
}

.ke-side-link::after {
    content: ">";
    color: #8c99ab;
    font-size: 12px;
}

.ke-side-link.is-current {
    background: #eef5fc;
    border-color: #c9dced;
    color: #2a84d2;
}

.ke-side-meta {
    display: grid;
    gap: 10px;
}

.ke-side-meta-item {
    padding: 12px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #d9dde4;
}

.ke-side-meta-item span {
    display: block;
    margin-bottom: 6px;
    color: #7d8796;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ke-side-meta-item strong,
.ke-side-meta-item p {
    margin: 0;
    color: #415166;
    line-height: 1.5;
}

.ke-side-meta-item strong {
    font-size: 13px;
}

.ke-side-meta-item p {
    font-size: 12px;
}

.keepedu-app-page .ke-main {
    min-width: 0;
    padding: 8px 18px 28px;
    overflow-x: clip;
}

.ke-page-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 8px 14px;
}

.ke-page-title h1 {
    margin: 0;
    color: #2d3848;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ke-page-title small {
    color: #8a95a5;
    font-size: 13px;
    font-weight: 500;
}

.ke-breadcrumbs {
    text-align: right;
    color: #93a0b1;
    font-size: 12px;
    line-height: 1.6;
}

.ke-page-content.page,
.ke-page-content.bernoulli-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.keepedu-app-page .bernoulli-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Unifica o espaçamento removendo as margens inferiores de todos os cards para o Painel e Bernoulli usarem as mesmas distâncias */
.keepedu-app-page .card {
    margin-bottom: 0 !important;
}

.keepedu-app-page .home-grid-col-main,
.keepedu-app-page .home-grid-col-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.keepedu-app-page .hero-shell,
.keepedu-app-page .card,
.keepedu-app-page .event-log-panel,
.keepedu-app-page .sidebar,
.keepedu-app-page .viewer,
.keepedu-app-page .table-wrapper,
.keepedu-app-page .home-hero-main,
.keepedu-app-page .home-hero-panel,
.keepedu-app-page .home-ops-card,
.keepedu-app-page .home-history-card,
.keepedu-app-page .upload-command-card,
.keepedu-app-page .bernoulli-hero,
.keepedu-app-page .bernoulli-form-card,
.keepedu-app-page .bernoulli-log-card,
.keepedu-app-page .bernoulli-help-card,
.keepedu-app-page .bernoulli-track-card {
    background: #ffffff !important;
    border: 1px solid #d7dce3 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.keepedu-app-page .section-kicker,
.keepedu-app-page .eyebrow,
.keepedu-app-page .panel-kicker {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    color: #8b95a4 !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
    text-transform: uppercase;

}

.keepedu-app-page .hero h1,
.keepedu-app-page .home-hero-main h1,
.keepedu-app-page .bernoulli-hero h1,
.keepedu-app-page .home-hero-panel h2,
.keepedu-app-page .section-head h2,
.keepedu-app-page .card h2 {
    color: #49566a !important;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.keepedu-app-page .hero p,
.keepedu-app-page .card-description,
.keepedu-app-page .home-hero-main p,
.keepedu-app-page .bernoulli-hero p,
.keepedu-app-page .sidebar-description,
.keepedu-app-page .viewer-help,
.keepedu-app-page .muted {
    color: #788394 !important;
}

.keepedu-app-page .btn-primary,
.keepedu-app-page .btn-secondary,
.keepedu-app-page .btn-light,
.keepedu-app-page .link-btn,
.keepedu-app-page .sidebar-filter-btn,
.keepedu-app-page .bernoulli-day-btn {
    min-height: 36px;
    border-radius: 3px !important;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none !important;
}

.keepedu-app-page .btn-primary {
    background: #2a8cdb !important;
    border: 1px solid #2a8cdb !important;
    color: #ffffff !important;
}

.keepedu-app-page .btn-primary:hover {
    background: #227cc3 !important;
}

.keepedu-app-page .btn-secondary,
.keepedu-app-page .btn-light,
.keepedu-app-page .sidebar-filter-btn,
.keepedu-app-page .bernoulli-day-btn {
    background: #f9fbfd !important;
    border: 1px solid #cfd7e2 !important;
    color: #516071 !important;
}

.keepedu-app-page .btn-secondary:hover,
.keepedu-app-page .btn-light:hover,
.keepedu-app-page .sidebar-filter-btn:hover,
.keepedu-app-page .bernoulli-day-btn:hover {
    background: #eef3f8 !important;
}

.keepedu-app-page .sidebar-filter-btn.ativo,
.keepedu-app-page .bernoulli-day-btn.active,
.keepedu-app-page .corner-btn.ativo {
    background: #2a8cdb !important;
    color: #ffffff !important;
    border-color: #2a8cdb !important;
}

.keepedu-app-page .validacao-table-wrapper .manual-form {
    min-width: 0;
    margin-left: 0;
    justify-content: flex-start;
}

.keepedu-app-page .validacao-table-wrapper .manual-form input {
    width: 92px !important;
    min-width: 0 !important;
    max-width: 110px !important;
    padding: 0 8px !important;
    text-align: center;
}

.keepedu-app-page .input-text,
.keepedu-app-page .manual-form input,
.keepedu-app-page .corner-toolbar select,
.keepedu-app-page .field-block input[type="file"] {
    background: #ffffff !important;
    border: 1px solid #cfd7e2 !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}

.keepedu-app-page .input-text:focus,
.keepedu-app-page .manual-form input:focus,
.keepedu-app-page .corner-toolbar select:focus,
.keepedu-app-page .field-block input[type="file"]:focus {
    border-color: #2a8cdb !important;
    box-shadow: 0 0 0 3px rgba(42, 140, 219, 0.12) !important;
}

.keepedu-app-page .home-hero {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
}

.keepedu-app-page .home-dashboard {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
}

.keepedu-app-page .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
    gap: 20px;
    align-items: start;
}

/* (A regra home-grid > * que causava o "espremido" foi removida) */

.keepedu-app-page .home-hero-main,
.keepedu-app-page .upload-command-card,
.keepedu-app-page .home-ops-card,
.keepedu-app-page .home-history-card,
.keepedu-app-page .home-hero-panel,
.keepedu-app-page .hero-shell,
.keepedu-app-page .card {
    padding: 22px;
}

.keepedu-app-page .home-hero-panel {
    background: #ffffff !important;
}

.keepedu-app-page .home-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.keepedu-app-page .home-flow-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keepedu-app-page .home-flow-item,
.keepedu-app-page .home-metric-card,
.keepedu-app-page .home-ops-item,
.keepedu-app-page .event-log-item,
.keepedu-app-page .summary-card,
.keepedu-app-page .stat-card,
.keepedu-app-page .sidebar-stat,
.keepedu-app-page .bernoulli-mini-card,
.keepedu-app-page .bernoulli-meta-item,
.keepedu-app-page .bernoulli-rule-item,
.keepedu-app-page .bernoulli-log-stat,
.keepedu-app-page .log-summary-item,
.keepedu-app-page .item-imagem {
    background: #f8fafc !important;
    border: 1px solid #d9e0e8 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.keepedu-app-page .home-flow-item {
    padding: 16px;
}

.keepedu-app-page .home-metric-card {
    padding: 16px;
}

.keepedu-app-page .home-flow-item strong,
.keepedu-app-page .home-metric-card strong,
.keepedu-app-page .home-ops-item strong,
.keepedu-app-page .item-imagem-title,
.keepedu-app-page .bernoulli-mini-card strong {
    color: #4c596d !important;
}

.keepedu-app-page .home-flow-item span,
.keepedu-app-page .home-metric-card p,
.keepedu-app-page .home-ops-item p,
.keepedu-app-page .item-imagem-subtitle,
.keepedu-app-page .item-imagem-detail,
.keepedu-app-page .bernoulli-mini-card span {
    color: #7a8493 !important;
}
.upload-lista-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.upload-lista-scroll::-webkit-scrollbar {
    width: 8px;
}

.upload-lista-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 42, 92, 0.25);
    border-radius: 8px;
}

.event-log-list-modal {
    overflow-y: auto;
    overflow-x: hidden;
}

.app-modal-process-dialog {
    width: min(580px, 94vw);
    min-height: 0;
    max-height: 94vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-modal-process-dialog .app-modal-header {
    flex-shrink: 0;
}

.app-modal-process-dialog .log-processamento {
    flex-shrink: 0;
}

.app-modal-process-dialog .event-log-head {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.app-modal-process-dialog .event-log-list.event-log-list-modal {
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(3 * 5.875rem + 2 * 10px + 24px) !important;
    height: auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d9e0e8;
    border-radius: 4px;
    background: #f8fafc;
}

.app-modal-process-dialog .event-log-list-modal .event-log-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
    min-height: 5.875rem;
}

.app-modal-process-dialog .app-modal-actions {
    flex-shrink: 0;
    margin-top: 12px;
}

.keepedu-app-page .event-log-list-modal .event-log-item {
    display: grid !important;
    grid-template-columns: 34px 1fr !important;
    flex-direction: unset !important;
    flex-shrink: 0;
    height: auto !important;
    align-items: start;
}

.keepedu-app-page .event-log-list-modal .event-log-item.warning {
    border-left: 4px solid #d97706 !important;
    background: linear-gradient(180deg, #fffdf7, #fff7e8) !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.error {
    border-left: 4px solid #b42318 !important;
    background: linear-gradient(180deg, #fff8f8, #fff1f1) !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.success {
    border-left: 4px solid #067647 !important;
    background: linear-gradient(180deg, #f6fffa, #effcf4) !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.info {
    border-left: 4px solid #d97706 !important;
    background: linear-gradient(180deg, #fffdf7, #fff7e8) !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.warning .event-log-icon,
.keepedu-app-page .event-log-list-modal .event-log-item.info .event-log-icon {
    background: rgba(217, 119, 6, 0.12) !important;
    color: #9a6700 !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.error .event-log-icon {
    background: rgba(180, 35, 24, 0.12) !important;
    color: #b42318 !important;
}

.keepedu-app-page .event-log-list-modal .event-log-item.success .event-log-icon {
    background: rgba(6, 118, 71, 0.12) !important;
    color: #067647 !important;
}

.keepedu-app-page .event-log-list-modal .event-log-body strong {
    color: #2f3a4a !important;
}

.keepedu-app-page .event-log-list-modal .event-log-file {
    color: #1d4f91 !important;
}

.app-modal-bernoulli-dialog {
    width: min(1040px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
}

.keepedu-app-page .bernoulli-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
    align-items: start;
}

.keepedu-app-page .bernoulli-modal-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    min-height: 100%;
}

.keepedu-app-page .bernoulli-modal-panel h2 {
    margin: 4px 0 0;
    font-size: 18px;
    color: #2f3a4a;
}

.keepedu-app-page .bernoulli-modal-panel .bernoulli-log-summary {
    margin: 0;
}

.keepedu-app-page .bernoulli-modal-panel .bernoulli-log-list {
    max-height: 220px;
}

@media (max-width: 900px) {
    .keepedu-app-page .bernoulli-modal-grid {
        grid-template-columns: 1fr;
    }
}

.processamento-stats-inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.processamento-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ke-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.keepedu-app-page .ke-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    min-width: 168px;
    padding: 0 16px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.keepedu-app-page .ke-action-btn-compact {
    min-width: auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.validacao-direct-buttons.ke-action-bar {
    margin-top: 4px;
}

.validacao-direct-buttons .ke-action-btn {
    flex: 1 1 220px;
}

.validacao-table-head {
    flex-wrap: wrap;
    gap: 12px;
}

.validacao-table-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.validacao-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.keepedu-app-page .validacao-image-cell .validacao-correcao-link {
    text-decoration: none;
}

.keepedu-app-page .page-home .home-grid {
    gap: 14px;
    align-items: start;
}

.keepedu-app-page .page-home .home-grid-col-main,
.keepedu-app-page .page-home .home-grid-col-side {
    gap: 14px;
}

.keepedu-app-page .home-hero-main,
.keepedu-app-page .home-hero-panel,
.keepedu-app-page .upload-command-card,
.keepedu-app-page .home-checklist-card {
    padding: 18px !important;
}

.keepedu-app-page .home-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.keepedu-app-page .home-metric-card {
    padding: 14px 16px !important;
    min-height: 0 !important;
}

.keepedu-app-page .home-flow-item {
    padding: 12px 14px !important;
}

.grid-imagem-btn {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 1px solid var(--border, #d8e0ef);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
}

.grid-imagem-btn img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #eef2f7;
}

.grid-imagem-btn span {
    padding: 8px 10px 10px;
    font-size: 12px;
    font-weight: 600;
    word-break: break-all;
}

.processamento-gallery-card .grid-imagem-btn.galeria-lote-oculto {
    display: none !important;
}

.ke-nav-item-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.validacao-direct-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.validacao-id-aval-topo .input-text {
    max-width: 320px;
}

.validacao-direct-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.keepedu-app-page .upload-lista,
.keepedu-app-page .summary-grid,
.keepedu-app-page .stats-grid,
.keepedu-app-page .log-summary,
.keepedu-app-page .sidebar-summary {
    gap: 12px;
}

.keepedu-app-page .section-badge,
.keepedu-app-page .highlight-pill,
.keepedu-app-page .item-imagem-chip,
.keepedu-app-page .item-imagem-pill,
.keepedu-app-page .status-badge {
    background: #edf3f8 !important;
    color: #5f6e80 !important;
    border: 1px solid #d7e0ea !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    /* Ajuste para que o badge não force a largura do contêiner pai. */
    white-space: normal !important; /* Permite quebra de linha se o texto for longo. */
    text-align: center; /* Centraliza o texto caso ele quebre a linha. */
}

.keepedu-app-page .status-validado,
.keepedu-app-page .status-badge.ok {
    background: #e3f7e8 !important;
    border-color: #c5ebd1 !important;
    color: #2a7e44 !important;
}

.keepedu-app-page .status-pendente,
.keepedu-app-page .status-badge.erro,
.keepedu-app-page .status-badge.pendencia {
    background: #fdeceb !important;
    border-color: #f5d4d0 !important;
    color: #b65248 !important;
}

.keepedu-app-page .status-enviado-keepedu {
    background: #e8f2fb !important;
    border-color: #c5d9f0 !important;
    color: #2f5f8f !important;
}

.keepedu-app-page .status-enviado-keepedu--completo {
    background: #dceaf8 !important;
    border-color: #a8c8e8 !important;
    color: #1f4f7a !important;
    font-weight: 600 !important;
}

.keepedu-app-page .validacao-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.keepedu-app-page .historico-vis-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #f7f9fb;
    border: 1px solid #d7dce3;
    border-radius: 4px;
}

.keepedu-app-page .historico-vis-chip {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.35;
}

.keepedu-app-page .historico-vis-chip strong {
    font-weight: 600;
    color: #64748b;
}

.keepedu-app-page .historico-vis-chip--destaque {
    padding: 2px 8px;
    background: #fff4e5;
    border: 1px solid #f2d2a0;
    border-radius: 999px;
    color: #8a5a12;
}

.keepedu-app-page .table-toolbar,
.keepedu-app-page .corner-toolbar {
    background: #f7f9fb !important;
    border: 1px solid #d7dce3 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.keepedu-app-page .table-wrapper {
    overflow: auto;
}

.keepedu-app-page .data-table {
    min-width: 980px;
    background: #ffffff;
}

.keepedu-app-page .data-table th {
    background: #eff3f7 !important;
    color: #59677b !important;
    border-bottom: 1px solid #d6dce4 !important;
    text-transform: none !important;
}

.keepedu-app-page .data-table td {
    border-bottom: 1px solid #e6ebf1 !important;
    color: #59677b !important;
}

.keepedu-app-page .data-table tbody tr:hover td {
    background: #f8fbfe !important;
}

.keepedu-app-page .linha-pendente td {
    background: #fff8f7 !important;
}

.keepedu-app-page .linha-validada td {
    background: #fbfdfc !important;
}

.keepedu-app-page .grid-imagens {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.keepedu-app-page .grid-imagens a {
    border-radius: 4px !important;
    padding: 10px;
    background: #f8fafc !important;
    border: 1px solid #d9e0e8 !important;
}

.keepedu-app-page .grid-imagens .grid-imagem-btn img,
.keepedu-app-page .grid-imagens img {
    height: 180px;
    background: #ffffff;
    border-radius: 2px !important;
}

.keepedu-app-page .page-processando,
.keepedu-app-page .page-processamento,
.keepedu-app-page .page-validacao,
.keepedu-app-page .page-correcao {
    max-width: none;
    margin: 0;
}

.keepedu-app-page .image-area img,
.keepedu-app-page .image-area canvas {
    max-width: none;
    display: block;
}

.keepedu-app-page .sidebar,
.keepedu-app-page .viewer {
    height: calc(100vh - 190px);
    min-height: 0;
}

.keepedu-app-page .sidebar {
    overflow: auto;
}

.keepedu-app-page .viewer {
    /* A rolagem foi movida para o .image-area para que a barra de ferramentas não role junto. */
    /* O viewer agora organiza os elementos internos verticalmente. */
    overflow: hidden; /* Garante que o viewer não cresça indefinidamente, corrigindo a rolagem infinita. */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espaçamento entre a barra de ferramentas e a área da imagem */
    padding: 16px;
}

.keepedu-app-page .image-area {
    background: #eceff4 !important;
    border: 1px solid #d7dde5 !important;
    border-radius: 4px !important;
    position: relative;
    overflow: auto;
    flex-grow: 1;
    min-height: 0;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

.keepedu-app-page .event-log-empty,
.keepedu-app-page .sidebar-empty {
    background: #f7f9fb !important;
    border: 1px dashed #d0d7e2 !important;
    border-radius: 4px !important;
}

.keepedu-app-page .progress-card,
.keepedu-app-page .log-processamento {
    background: #ffffff !important;
    border: 1px solid #d7dce3 !important;
    border-radius: 4px !important;
}

.keepedu-app-page .progress-bar,
.keepedu-app-page .log-processamento .progress-bar {
    height: 12px;
    background: #e5ebf2 !important;
    border: 1px solid #d4dce6 !important;
    border-radius: 999px !important;
}

.keepedu-app-page .progress-fill,
.keepedu-app-page .log-processamento .progress-fill {
    background: linear-gradient(90deg, #2a8cdb, #5db6fb) !important;
}

.keepedu-app-page .erro-box {
    border-radius: 4px !important;
    background: #fff5f4 !important;
    border: 1px solid #f1c7c2 !important;
    color: #b65248 !important;
}

.keepedu-app-page .app-modal-dialog {
    border-radius: 8px !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

.keepedu-app-page .app-modal-backdrop {
    z-index: 1;
}

.keepedu-app-page .app-modal--stack {
    z-index: 1300;
}

.keepedu-app-page .app-modal-image-toolbar .btn-light,
.keepedu-app-page .app-modal-close {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
}

.keepedu-app-page .app-modal-image-stage {
    background: #f4f7fb;
    border-radius: 4px;
}

.keepedu-app-page .app-modal-image-preview {
    border-radius: 4px !important;
}

.keepedu-auth-page .topbar {
    display: none;
}

.keepedu-auth-page {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.22) 0 3px, transparent 4px),
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.22) 0 3px, transparent 4px),
        radial-gradient(circle at 12% 82%, rgba(255, 255, 255, 0.22) 0 3px, transparent 4px),
        radial-gradient(circle at 84% 82%, rgba(255, 255, 255, 0.22) 0 3px, transparent 4px),
        linear-gradient(180deg, #8d47ce 0%, #6d27ae 100%);
    background-size: 40px 40px, 40px 40px, 40px 40px, 40px 40px, auto;
}

.ke-auth-header {
    min-height: 76px;
    padding: 0 34px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ke-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #4152d8;
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
}

.ke-auth-brand .ke-logo-mark {
    border-color: #4152d8;
}

.ke-auth-brand .ke-logo-mark::before,
.ke-auth-brand .ke-logo-mark::after {
    background: #4152d8;
}

.ke-auth-brand .ke-logo-word {
    color: #4152d8;
    font-size: 24px;
}

.ke-auth-header img {
    height: 44px;
    width: auto;
}

.ke-auth-main {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 20px;
}

.ke-auth-card {
    width: min(100%, 470px);
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 30px 24px;
    box-shadow: 0 28px 80px rgba(49, 13, 93, 0.28);
}

.ke-auth-card img {
    height: 56px;
    width: auto;
    display: block;
    margin: 0 auto 12px;
}

.ke-auth-card h1 {
    margin: 0;
    text-align: center;
    color: #2f68d2;
    font-size: 28px;
    font-weight: 800;
}

.ke-auth-card p {
    margin: 8px 0 0;
    text-align: center;
    color: #5a6880;
    line-height: 1.6;
}

.ke-auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.ke-auth-field label {
    display: block;
    margin-bottom: 8px;
    color: #2f3a4c;
    font-weight: 700;
}

.ke-auth-input {
    position: relative;
}

.ke-auth-input > span,
.ke-auth-input > .ke-btn-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ke-auth-input > .ke-btn-icon svg {
    display: block;
}

.ke-password-toggle .ke-btn-icon {
    position: static;
    transform: none;
    pointer-events: auto;
    color: #64748b;
}

.ke-auth-input input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 38px;
    border: 1px solid #d4dbe6;
    border-radius: 12px;
    background: #f8fbff;
    font-size: 14px;
}

.ke-auth-input input:focus {
    outline: none;
    border-color: #4b7de6;
    box-shadow: 0 0 0 4px rgba(75, 125, 230, 0.12);
}

.ke-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -2px;
    color: #5d6980;
    font-size: 13px;
}

.ke-auth-row a {
    color: #2f68d2;
    text-decoration: none;
    font-weight: 700;
}

.ke-auth-submit {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: #21b967;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.ke-auth-submit:hover {
    background: #1da45c;
}

.ke-auth-alert {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff4f2;
    border: 1px solid #f3d0cc;
    color: #b45248;
    font-size: 14px;
    line-height: 1.5;
}

.ke-auth-meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf1f6;
    display: grid;
    gap: 10px;
}

.ke-auth-meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #66758a;
    font-size: 13px;
}

.ke-auth-meta-item strong {
    color: #38455a;
}

@media (max-width: 1100px) {
    .ke-shell {
        grid-template-columns: 1fr;
    }

    .ke-sidebar {
        border-right: 0;
        border-bottom: 1px solid #d6d9dd;
        padding-bottom: 14px;
    }

    .ke-nav {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        padding-inline: 10px;
    }

    .ke-sidebar-panel {
        margin-top: 0;
    }

    .keepedu-app-page .home-hero,
    .keepedu-app-page .home-dashboard,
    .keepedu-app-page .home-grid,
    .keepedu-app-page .bernoulli-layout {
        grid-template-columns: 1fr !important;
    }

    .keepedu-app-page .sidebar,
    .keepedu-app-page .viewer {
        height: auto;
    }
}

@media (max-width: 780px) {
    .ke-header,
    .ke-auth-header {
        padding-inline: 16px;
    }

    .ke-user-name {
        max-width: 180px;
    }

    .ke-page-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .ke-breadcrumbs {
        text-align: left;
    }

    .keepedu-app-page .hero-stats-row,
    .keepedu-app-page .summary-grid,
    .keepedu-app-page .stats-grid,
    .keepedu-app-page .home-hero-metrics {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   CORREÇÃO: Ajuste de textos longos e quebra de linha no Menu Lateral (KeepEdu)
   ========================================================================== */

/* Força o painel lateral de contexto e metadados a respeitar a largura máxima */
.ke-sidebar-panel,
.ke-side-meta-item,
.ke-sidebar-group {
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Evita que qualquer elemento vaze visualmente */
}

/* Força qualquer texto contínuo muito longo (strings sem espaço) a quebrar de linha */
.ke-sidebar-panel strong,
.ke-sidebar-panel a,
.ke-side-meta-item strong,
.ke-side-meta-item p,
.ke-sidebar-group strong {
    word-break: break-all;      /* Força a quebra em qualquer caractere se necessário */
    overflow-wrap: anywhere;    /* Garante compatibilidade em múltiplos navegadores */
    white-space: normal;        /* Permite que o texto use mais de uma linha naturalmente */
    display: block;
}

/* Garante comportamento idêntico caso a classe antiga do OMRCheck (.sidebar) ainda seja injetada */
.keepedu-app-page .sidebar .context-card,
.keepedu-app-page .sidebar p,
.keepedu-app-page .sidebar strong {
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* ==========================================================================
   CORREÇÃO: Fixar a Barra Lateral Permanentemente na Tela (Sem Rolagem)
   ========================================================================== */

.ke-sidebar {
    position: sticky;
    top: 70px; /* Altura do header */
    height: calc(100vh - 70px); /* Preenche a altura da viewport abaixo do header */
    overflow-y: auto; /* Permite que o conteúdo da sidebar role, se necessário */
    align-self: start; /* Garante que o item do grid comece no topo */
}

/* ==========================================================================
   INTERAÇÃO: Recolher e Expandir o Menu Lateral (Sidebar Toggle)
   ========================================================================== */

.ke-header-menu {
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ke-header-menu:hover {
    opacity: 0.8;
}

.ke-shell.sidebar-collapsed {
    grid-template-columns: 96px minmax(0, 1fr) !important;
}

/* Header alinhado à coluna estreita da sidebar (como KeepEdu) */
body.sidebar-collapsed .ke-header {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
    padding: 0;
    gap: 0;
    min-height: 84px;
}

body.sidebar-collapsed .ke-header-left {
    width: 96px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

body.sidebar-collapsed .ke-logo {
    justify-content: center;
    gap: 0;
}

body.sidebar-collapsed .ke-logo-icon {
    height: 40px;
    width: 40px;
    max-width: 40px;
    opacity: 1;
}

body.sidebar-collapsed .ke-logo-brand {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
}

body.sidebar-collapsed .ke-header-right {
    padding: 0 28px;
    justify-content: flex-end;
}

/* Hambúrguer vira X ao recolher */
body.sidebar-collapsed .ke-header-menu {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 0;
}

body.sidebar-collapsed .ke-header-menu::before,
body.sidebar-collapsed .ke-header-menu::after {
    height: 3px;
}

body.sidebar-collapsed .ke-header-menu::before {
    top: 21px;
    left: 9px;
    right: 9px;
    transform: rotate(45deg);
}

body.sidebar-collapsed .ke-header-menu::after {
    top: 21px;
    left: 9px;
    right: 9px;
    transform: rotate(-45deg);
}

body.sidebar-collapsed .ke-header-menu span {
    opacity: 0;
}

.ke-shell.sidebar-collapsed .ke-sidebar {
    padding: 10px 0 24px;
    align-items: stretch;
    gap: 8px;
}

.ke-shell.sidebar-collapsed .ke-sidebar-title {
    max-height: 0;
    opacity: 0;
    padding-block: 0;
}

.ke-shell.sidebar-collapsed .ke-sidebar-panel,
.ke-shell.sidebar-collapsed .ke-sidebar-group {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border-width: 0;
    pointer-events: none;
}

.ke-shell.sidebar-collapsed .ke-nav {
    width: 100%;
}

.ke-shell.sidebar-collapsed .ke-nav-item {
    justify-content: center;
    padding: 0;
    gap: 0;
    min-height: 44px;
    margin-inline: 0;
    border-left-width: 3px;
}

.ke-shell.sidebar-collapsed .ke-nav-item > span:not(.ke-nav-icon) {
    max-width: 0;
    opacity: 0;
}

.ke-shell.sidebar-collapsed .ke-nav-icon {
    width: auto;
    font-size: 18px;
}

.ke-shell.sidebar-collapsed .ke-nav-icon-svg .ke-btn-icon {
    width: 18px;
    height: 18px;
}

/* Subitens do lote viram marcadores verticais (pontos) */
.ke-shell.sidebar-collapsed .ke-nav-lote {
    gap: 0;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item {
    min-height: 28px;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item .ke-nav-icon {
    font-size: 0;
    width: 10px;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item .ke-nav-icon::after {
    content: "·";
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    color: #9aa5b5;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item.is-active .ke-nav-icon::after {
    color: #2a84d2;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item-disabled .ke-nav-icon::after {
    color: #c5ccd6;
}

.ke-shell.sidebar-collapsed .ke-nav-lote .ke-nav-item-disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

/* Nova linha horizontal para os blocos */
.bernoulli-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Divide em 3 colunas iguais */
    gap: 20px;
}

/* Garante que os cards internos herdem o espaçamento e a borda padrão */
.bernoulli-stats-row .bernoulli-meta-item.card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.bernoulli-stats-row .bernoulli-meta-item strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    margin-bottom: 4px;
}

.bernoulli-stats-row .bernoulli-meta-item span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

/* Limita o crescimento vertical do console de logs */
.ke-console-scroll {
    flex-grow: 1;               /* Expande para acompanhar a altura nivelada da linha */
    min-height: 180px;
    max-height: 280px;          /* Limite máximo seguro */
    overflow-y: auto;           /* Cria a barra de rolagem vertical quando necessário */
    background: #f8f9fa;        /* Fundo sutil de terminal */
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;     /* Fonte padrão para leitura de logs */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Deixa a barra de rolagem mais fina e moderna (padrão Webkit) */
.ke-console-scroll::-webkit-scrollbar {
    width: 6px;
}
.ke-console-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.ke-console-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.ke-console-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   LAYOUT BERNOULLI (Nivelamento Automático via Grid)
   ========================================================================== */
.keepedu-app-page .bernoulli-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
    gap: 16px 20px;
    align-items: stretch;
}

.keepedu-app-page .bernoulli-form-card,
.keepedu-app-page .bernoulli-help-card {
    display: flex;
    flex-direction: column;
}

.keepedu-app-page .bernoulli-form-card {
    justify-content: space-between;
}

/* 3. Centraliza as 4 métricas (Linhas, RMB, etc.) no espaço que sobrar no card esquerdo */
.keepedu-app-page .bernoulli-log-summary {
    margin: auto 0;
}
/* =========================
   FIX GLOBAL LAYOUT
========================= */

* {
    box-sizing: border-box;
}

.page-content,
.dashboard-grid,
.main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.card,
.panel,
.dashboard-card {
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-body,
.panel-body {
    padding: 24px;
}

.info-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 120px;
}

img {
    max-width: 100%;
    display: block;
}

.sidebar,
.dashboard-sidebar {
    width: 100%;
}

.content-area {
    min-width: 0;
}

/* evita quebra visual */
.row,
.grid-row {
    align-items: stretch;
}

/* ==========================================================================
   FIX DEFINITIVO TOOLBAR
   ========================================================================== */

section.toolbar-modern {
    display: flex !important;
    flex-direction: column !important;

    width: 100% !important;

    background: #fff !important;
    border: 1px solid #dbe2ea !important;
    border-radius: 10px !important;

    overflow: hidden !important;
}

section.toolbar-modern > .toolbar-main {
    display: flex !important;
    flex-wrap: wrap !important;

    align-items: flex-end !important;

    gap: 16px !important;

    width: 100% !important;

    padding: 20px !important;
}

section.toolbar-modern .toolbar-group {
    display: flex !important;
    flex-direction: column !important;

    gap: 8px !important;
}

section.toolbar-modern .search-group {
    flex: 1 1 320px !important;
}

section.toolbar-modern .zoom-group {
    width: 180px !important;
    flex: 0 0 180px !important;
}

section.toolbar-modern .action-group {
    width: 220px !important;
    flex: 0 0 220px !important;
}

section.toolbar-modern input[type="text"] {
    width: 100% !important;
    height: 46px !important;

    padding: 0 14px !important;

    border: 1px solid #cfd7e2 !important;
    border-radius: 8px !important;

    background: #fff !important;
}

section.toolbar-modern select {
    width: 100% !important;
    height: 46px !important;
}

section.toolbar-modern .btn-primary {
    width: 100% !important;
    height: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 8px !important;
}

section.toolbar-modern .toolbar-info {
    width: 100% !important;

    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    padding-top: 8px !important;
}

section.toolbar-modern .toolbar-footer {
    display: flex !important;

    justify-content: space-between !important;
    align-items: center !important;

    padding: 14px 20px !important;

    border-top: 1px solid #e2e8f0 !important;

    background: #f8fafc !important;
}

/* ==========================================================================
   HOME: Alinhamento do painel de fluxo
   ========================================================================== */
.keepedu-app-page .home-hero-panel h2 {
    margin-top: 0;
    margin-bottom: 4px; /* Reduz o espaço após o título */
    font-size: 29px; /* Tamanho alinhado ao h1 principal, com ajuste de +1px */
}

.keepedu-app-page .home-hero-panel p {
    margin-top: 0;
    margin-bottom: 10px; /* Reduz o espaço antes da lista de passos */
    font-size: 28px; /* Tamanho alinhado ao h1 principal */
}

/* ==========================================================================
   HOME: Ajuste de espaçamento no card "Antes de começar"
   ========================================================================== */
.keepedu-app-page .home-ops-list {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Define um espaçamento consistente entre os itens */
    flex-grow: 1; /* Faz a lista crescer para preencher o espaço do card */
    justify-content: space-around; /* Distribui os itens verticalmente */
}

.keepedu-app-page .home-ops-item {
    height: auto; /* Remove a altura de 100% para que o item se ajuste ao seu conteúdo */
    padding: 16px; /* Adiciona um preenchimento interno para consistência visual */
    justify-content: center; /* Centraliza o conteúdo dentro do item */
}

/* ==========================================================================
   HOME: Alinhamento dos painéis superiores
   ========================================================================== */
.keepedu-app-page .eyebrow,
.keepedu-app-page .panel-kicker {
    margin-bottom: 8px;
}

.keepedu-app-page .home-hero-main h1 {
    margin-top: 0;
    margin-bottom: 8px;
}
.keepedu-app-page .home-hero-main p {
    margin-top: 0;
}


.event-log-list {
    flex: 1;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;
}

.upload-command-bottom {
    align-items: start !important;
}

/* ==========================================================================
   HOME: Conter altura do log de processamento
   ========================================================================== */
.log-processamento-home {
    max-height: 220px;
    overflow-y: auto;
}

.log-processamento-home::-webkit-scrollbar {
    width: 6px;
}

.log-processamento-home::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ==========================================================================
   HOME: Estatísticas do Job no Painel de Eventos
   ========================================================================== */

/* Container para as estatísticas, posicionado dentro do card de eventos */


.job-stats-grid.visible {
    display: grid; /* Torna o grid visível quando um job está em andamento */
}


/* =========================================
   HEADER DO CARD DE UPLOAD
========================================= */

/* CARD EVENTOS */
.event-log-panel {
    display: flex;
    flex-direction: column;

    width: 100%;

    padding: 18px;

    overflow: hidden;

    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
}

/* CABEÇALHO */
.event-log-head {
    flex-shrink: 0;
    margin-bottom: 14px;
}


/* SCROLL */
.event-log-list::-webkit-scrollbar {
    width: 6px;
}

.event-log-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* =========================================
   FIX DEFINITIVO NOVO LOTE
========================================= */

.upload-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.event-log-panel {
    width: 100%;
    padding: 16px;
    overflow: hidden;
}

.event-log-head {
    margin-bottom: 12px;
}

.event-log-list {
    max-height: 160px;
    overflow-y: auto;
    overflow-x: hidden;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-log-list::-webkit-scrollbar {
    width: 6px;
}

.event-log-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.upload-command-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 90px));
    gap: 12px;
    width: fit-content;
}

.job-stat-item {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
}

.job-stat-item strong {
    font-size: 20px;
    font-weight: 700;
    color: #334155;
    line-height: 1.2;
}

.job-stat-item span {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.log-processamento-home {
    margin-top: 18px;
}

/* Padronização: remove visual legado (gradientes, stat-cards duplicados) */
.keepedu-app-page .validacao-hero::before,
.keepedu-app-page .processamento-hero::before,
.keepedu-app-page .bernoulli-hero::before,
.keepedu-app-page .correcao-hero::before {
    display: none !important;
    content: none !important;
}

.keepedu-app-page .ke-page-hero,
.keepedu-app-page .validacao-hero,
.keepedu-app-page .processamento-hero {
    background: #ffffff !important;
    border: 1px solid #d7dce3 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 22px !important;
}

.keepedu-app-page .validacao-primary-stats,
.keepedu-app-page .validacao-secondary-stats,
.keepedu-app-page .validacao-hero-stats {
    display: none !important;
}

.keepedu-app-page .hero-stats-row .hero-stat {
    background: #f8fafc !important;
    border: 1px solid #d9e0e8 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 16px 18px !important;
}

.keepedu-app-page .hero-stats-row .hero-stat strong {
    color: #2a8cdb !important;
    font-size: 28px !important;
    font-weight: 700 !important;
}

.keepedu-app-page .stats-grid .stat-card {
    background: #f8fafc !important;
    border: 1px solid #d9e0e8 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.keepedu-app-page .grid-imagens {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.keepedu-app-page .app-modal-image-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 22px 12px;
}

.keepedu-app-page .app-modal--imagem-scroll {
    display: block !important;
    overflow: auto !important;
    align-items: unset !important;
    justify-content: unset !important;
    padding: 16px 12px 28px !important;
}

.keepedu-app-page .app-modal--imagem-scroll.hidden {
    display: none !important;
}

.keepedu-app-page .app-modal--imagem-scroll .app-modal-image-dialog {
    width: min(96vw, 1100px) !important;
    max-width: min(96vw, 1100px) !important;
    margin: 0 auto !important;
}

.keepedu-app-page .app-modal-image-body {
    display: block !important;
    padding: 0 22px 20px;
    min-height: 0 !important;
    overflow: visible !important;
}

.keepedu-app-page .app-modal-image-stage {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    border: none !important;
}

.keepedu-app-page .app-modal-image-preview {
    display: block !important;
    width: 100%;
    height: auto !important;
    max-width: 100%;
    margin: 0 !important;
    image-orientation: from-image;
    border-radius: 4px !important;
    box-shadow: none !important;
}

body.ke-modal-imagem-aberto {
    overflow: hidden !important;
}

/* ==========================================================================
   HOME: Grid para Upload e Monitoramento
   ========================================================================== */
.upload-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* ==========================================================================
   HOME: Andamento do Processamento no Painel de Eventos
   ========================================================================== */
.event-log-panel .log-processamento {
    /* Remove a aparência de card aninhado */
    background: transparent !important;
    border: none !important;
    
    /* Adiciona espaçamento e um separador */
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

/* Painel / simetria: ver web/static/css/pages/_painel.css e _symmetry.css */

/* ==========================================================================
   Histórico de processos
   ========================================================================== */
.keepedu-app-page .historico-lotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.keepedu-app-page .historico-lote-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    padding: 16px 16px 14px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.keepedu-app-page .historico-lote-card--alerta {
    border-color: #e8c87a;
    background: #fffdf6;
}

.keepedu-app-page .historico-lote-card-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keepedu-app-page .historico-lote-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2b3c;
    line-height: 1.35;
    word-break: break-word;
}

.keepedu-app-page .historico-lote-card-data {
    font-size: 12px;
    color: #64748b;
}

.keepedu-app-page .historico-lote-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
}

.keepedu-app-page .historico-lote-card-stats div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 68px;
    text-align: center;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-lote-card-stats dt {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.25;
    color: #64748b;
}

.keepedu-app-page .historico-lote-card-stats dd {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #2a8cdb;
}

.keepedu-app-page .historico-lote-stat-ok {
    color: #16a34a !important;
}

.keepedu-app-page .historico-lote-stat-erro {
    color: #dc2626 !important;
}

.keepedu-app-page .historico-lote-stat-manual {
    color: #d97706 !important;
}

.keepedu-app-page .historico-lote-card-meta {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.keepedu-app-page .historico-lote-pendente {
    color: #b45309;
}

.keepedu-app-page .historico-lote-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.keepedu-app-page .historico-lote-card-btn-principal {
    width: 100%;
    justify-content: center;
}

.keepedu-app-page .historico-lotes-empty {
    margin-top: 20px;
    padding: 28px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
}

.keepedu-app-page .historico-lotes-empty .ke-action-btn {
    margin-top: 16px;
}

.keepedu-app-page .historico-lote-card--arquivado {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.keepedu-app-page .historico-avaliacao-card {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.keepedu-app-page .historico-avaliacao-card:hover,
.keepedu-app-page .historico-avaliacao-card:focus-visible {
    border-color: #2a8cdb;
    box-shadow: 0 6px 18px rgba(42, 140, 219, 0.12);
    outline: none;
}

.keepedu-app-page .historico-avaliacao-leituras-badge {
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
    color: #2a8cdb;
    font-size: 12px;
    font-weight: 600;
}

.keepedu-app-page .app-modal-dialog--wide {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.keepedu-app-page .app-modal-dialog--historico-processamentos {
    width: min(1080px, calc(100vw - 32px));
}

.keepedu-app-page .app-modal-dialog--historico-processamentos .app-modal-text {
    margin-bottom: 4px;
}

.keepedu-app-page .historico-processamentos-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.keepedu-app-page .historico-processamentos-vazio {
    margin: 0;
    padding: 20px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
}

.keepedu-app-page .historico-processamento-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.keepedu-app-page .historico-processamento-item--arquivado {
    background: #f1f5f9;
}

.keepedu-app-page .historico-processamento-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.keepedu-app-page .historico-processamento-data {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a2b3c;
}

.keepedu-app-page .historico-processamento-rotulo {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.keepedu-app-page .historico-processamento-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.keepedu-app-page .historico-processamento-stats div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 62px;
    text-align: center;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-processamento-stats dt {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.25;
    color: #64748b;
}

.keepedu-app-page .historico-processamento-stats dd {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #2a8cdb;
}

.keepedu-app-page .historico-processamento-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.keepedu-app-page .historico-processamento-btn-principal {
    width: 100%;
    justify-content: center;
}

.keepedu-app-page .historico-processamento-actions-secundarias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keepedu-app-page .historico-badge-arquivado {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    background: #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-badge-ativo {
    color: #15803d;
    font-weight: 600;
}

.keepedu-app-page .historico-voltar-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.keepedu-app-page .historico-stats-compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.keepedu-app-page .historico-stat-chip {
    padding: 10px 12px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #d9e0e8;
    border-radius: 4px;
}

.keepedu-app-page .historico-stat-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.keepedu-app-page .historico-stat-chip strong {
    font-size: 20px;
    font-weight: 700;
    color: #2a8cdb;
    line-height: 1.2;
}

@media (max-width: 900px) {
    .keepedu-app-page .historico-stats-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.keepedu-app-page .historico-resumo-txt {
    margin: 0;
    padding: 16px;
    max-height: 280px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-tag-manual {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 4px;
}

.keepedu-app-page .historico-detalhes-expander {
    font-size: 13px;
}

.keepedu-app-page .historico-detalhes-expander summary {
    cursor: pointer;
    color: #2a8cdb;
    font-weight: 600;
}

.keepedu-app-page .historico-detalhes-expander p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #475569;
}

.keepedu-app-page .historico-arquivos-lista {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #475569;
}

.keepedu-app-page .historico-table-wrapper .data-table td {
    vertical-align: top;
}

.keepedu-app-page .historico-lista-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 16px 0 20px;
}

.keepedu-app-page .historico-lista-toolbar .table-toolbar-search {
    flex: 1 1 280px;
}

.keepedu-app-page .historico-lista-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keepedu-app-page .historico-registros-pagination {
    margin-top: 16px;
}

.keepedu-app-page .historico-lista-pagination {
    margin-top: 20px;
    justify-content: center;
}

.keepedu-app-page .historico-lista-pagination .btn-light[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}

/* Validação — barra da tabela com atalho para correção */
.keepedu-app-page .validacao-table-toolbar {
    align-items: flex-end;
}

.keepedu-app-page .validacao-table-toolbar .table-toolbar-actions {
    flex: 0 0 auto;
}

.keepedu-app-page .validacao-table-wrapper {
    overflow-x: auto;
}

.keepedu-app-page .validacao-table-wrapper .data-table {
    table-layout: fixed;
    min-width: 1080px;
}

.keepedu-app-page .validacao-table-wrapper .data-table td {
    vertical-align: top;
    white-space: normal;
}

/* Kanban — layout Notion com paleta OMRCheck */

.keepedu-app-page .page-kanban {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.keepedu-app-page .kanban-entrega-card {
    margin-bottom: 0;
}

.keepedu-app-page .kanban-entrega-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.keepedu-app-page .kanban-entrega-linhas {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.keepedu-app-page .kanban-entrega-grid {
    display: grid;
    gap: 12px 16px;
    align-items: end;
}

.keepedu-app-page .kanban-entrega-grid--topo {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
}

.keepedu-app-page .kanban-entrega-grid--baixo {
    grid-template-columns: minmax(300px, 1.6fr) minmax(88px, 108px) repeat(3, minmax(0, 1fr));
}

.keepedu-app-page .kanban-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #566273;
    min-width: 0;
}

.keepedu-app-page .kanban-field > span {
    font-weight: 600;
    line-height: 1.25;
}

.keepedu-app-page .kanban-field .input-text {
    width: 100%;
    min-width: 0;
}

/* Select pesquisável (Kanban) */
.keepedu-app-page .ke-select-busca {
    position: relative;
    width: 100%;
    min-width: 0;
}

.keepedu-app-page .ke-select-busca-native {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.keepedu-app-page .ke-select-busca-input {
    width: 100%;
    box-sizing: border-box;
}

.keepedu-app-page .ke-select-busca-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.keepedu-app-page .ke-select-busca-lista {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #2a8cdb;
    border-top: 1px solid #d9e0e8;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(15, 42, 92, 0.14);
}

.keepedu-app-page .ke-select-busca.is-open .ke-select-busca-input {
    border-color: #2a8cdb;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 0 3px rgba(42, 140, 219, 0.12);
}

.keepedu-app-page .ke-select-busca-opcao {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: #3f4d61;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.keepedu-app-page .ke-select-busca-opcao:hover,
.keepedu-app-page .ke-select-busca-opcao:focus-visible {
    background: #eef5fc;
    outline: none;
}

.keepedu-app-page .ke-select-busca-opcao.is-selected {
    background: #e8f3fc;
    font-weight: 700;
    color: #1f6fb2;
}

.keepedu-app-page .ke-select-busca-opcao--limpar,
.keepedu-app-page .ke-select-multi-opcao--limpar {
    color: #788394;
    font-style: italic;
}

.keepedu-app-page .ke-select-busca-vazio {
    margin: 0;
    padding: 10px 12px;
    color: #788394;
    font-size: 12px;
}

.keepedu-app-page .kanban-detalhe-panel .ke-select-busca-lista {
    z-index: 60;
}

/* Select múltiplo (Kanban — séries) */
.keepedu-app-page .ke-select-multi {
    position: relative;
    width: 100%;
    min-width: 0;
}

.keepedu-app-page .ke-select-multi-campo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 4px 6px;
    width: 100%;
    height: auto !important;
    min-height: 36px;
    padding: 5px 8px;
    box-sizing: border-box;
    cursor: text;
    overflow: visible;
}

.keepedu-app-page .ke-select-multi-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
}

.keepedu-app-page .ke-select-multi-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin: 0;
    padding: 2px 6px;
    border-radius: 6px;
    background: #efe6fb;
    color: #6b4f9b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.keepedu-app-page .ke-select-multi-chip-texto {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.keepedu-app-page .ke-select-multi-chip-remover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.keepedu-app-page .ke-select-multi-chip-remover:hover {
    background: rgba(0, 0, 0, 0.14);
}

.keepedu-app-page .ke-select-multi-input {
    flex: 1 1 140px;
    min-width: 140px;
    width: auto;
    height: auto !important;
    margin: 0;
    padding: 4px 2px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    min-height: 26px;
    font-size: 13px;
}

.keepedu-app-page .ke-select-multi-input:focus {
    box-shadow: none !important;
}

.keepedu-app-page .ke-select-multi-lista {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #2a8cdb;
    border-top: 1px solid #d9e0e8;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 24px rgba(15, 42, 92, 0.14);
}

.keepedu-app-page .ke-select-multi.is-open .ke-select-multi-campo {
    border-color: #2a8cdb;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 0 0 3px rgba(42, 140, 219, 0.12);
}

.keepedu-app-page .ke-select-multi-opcao {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    color: #3f4d61;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.keepedu-app-page .ke-select-multi-opcao:hover,
.keepedu-app-page .ke-select-multi-opcao:focus-visible {
    background: #eef5fc;
    outline: none;
}

.keepedu-app-page .ke-select-multi-opcao.is-selected {
    background: #e8f3fc;
    font-weight: 700;
    color: #1f6fb2;
}

.keepedu-app-page .ke-select-multi-opcao-check {
    width: 14px;
    flex-shrink: 0;
    font-size: 12px;
    color: #2a8cdb;
}

.keepedu-app-page .ke-select-multi-vazio {
    margin: 0;
    padding: 10px 12px;
    color: #788394;
    font-size: 12px;
}

.keepedu-app-page .kanban-detalhe-panel .ke-select-multi-lista {
    z-index: 60;
}

.keepedu-app-page .kanban-prop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keepedu-app-page .kanban-datas-grupo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
    min-width: 0;
    padding: 0 14px;
    background: #f8fafc;
    border: 1px solid #e4eaf2;
    border-radius: 6px;
    box-sizing: border-box;
    align-self: end;
}

.keepedu-app-page .kanban-datas-grupo .kanban-field > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.keepedu-app-page .kanban-field--total-cartoes {
    max-width: none;
}

.keepedu-app-page .kanban-entrega-grid .input-text,
.keepedu-app-page .kanban-entrega-grid .ke-select-busca-input,
.keepedu-app-page .kanban-entrega-grid .ke-select-multi--entrega .ke-select-multi-campo {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
}

.keepedu-app-page .kanban-entrega-grid .ke-select-multi--entrega .ke-select-multi-campo {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.keepedu-app-page .kanban-tag--turma {
    background: #eef4ff;
    border-color: #c8d9f5;
    color: #2a4f86;
}

.keepedu-app-page .ke-select-multi.is-disabled .ke-select-multi-campo,
.keepedu-app-page .ke-select-busca.is-disabled .ke-select-busca-input {
    opacity: 0.62;
    pointer-events: none;
    background: #f3f6fa !important;
    cursor: not-allowed;
}

/* Multi-série compacto no grid de entrega (mesma altura dos demais campos) */
.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-campo {
    display: block;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 4px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.35;
    scrollbar-width: thin;
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-chips {
    display: inline;
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-chip {
    display: inline-flex;
    vertical-align: middle;
    margin: 1px 4px 1px 0;
    padding: 1px 5px;
    font-size: 10px;
    max-width: calc(100% - 6px);
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-chip-texto {
    max-width: 9rem;
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-chip-remover {
    width: 12px;
    height: 12px;
    font-size: 10px;
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-input {
    display: inline-block;
    vertical-align: middle;
    width: auto;
    min-width: 72px;
    max-width: 100%;
    min-height: 0;
    margin: 1px 0;
    padding: 2px 0;
    font-size: 12px;
    flex: none;
}

.keepedu-app-page .ke-select-multi--entrega .ke-select-multi-chips:empty + .ke-select-multi-input {
    width: calc(100% - 4px);
    min-width: 0;
}

.keepedu-app-page .kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.keepedu-app-page .kanban-entrega-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

@media (max-width: 1100px) {
    .keepedu-app-page .kanban-entrega-grid--topo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .keepedu-app-page .kanban-entrega-grid--topo .kanban-field:first-child {
        grid-column: span 2;
    }

    .keepedu-app-page .kanban-entrega-grid--baixo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .keepedu-app-page .kanban-entrega-grid--baixo .kanban-datas-grupo {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .keepedu-app-page .kanban-entrega-grid--topo,
    .keepedu-app-page .kanban-entrega-grid--baixo {
        grid-template-columns: 1fr;
    }

    .keepedu-app-page .kanban-entrega-grid--topo .kanban-field:first-child,
    .keepedu-app-page .kanban-entrega-grid--baixo .kanban-datas-grupo {
        grid-column: span 1;
    }

    .keepedu-app-page .kanban-datas-grupo {
        grid-template-columns: 1fr;
    }
}

.keepedu-app-page .kanban-form-erro {
    margin: 0;
    color: #c0392b;
    font-size: 13px;
}

.keepedu-app-page .kanban-board-wrap {
    background: #f3f4f6;
    border: 1px solid #d7dce3;
    border-radius: 8px;
    padding: 14px;
}

.keepedu-app-page .kanban-board-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.keepedu-app-page .kanban-board-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.keepedu-app-page .kanban-board-toolbar-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.keepedu-app-page .kanban-board-toolbar-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.keepedu-app-page .kanban-board-hint {
    font-size: 12px;
    color: #788394;
}

.keepedu-app-page .kanban-board-filtros {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 10px;
}

@media (max-width: 960px) {
    .keepedu-app-page .kanban-board-filtros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .keepedu-app-page .kanban-board-filtros {
        grid-template-columns: 1fr;
    }
}

.keepedu-app-page .kanban-board-filtro {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.keepedu-app-page .kanban-board-filtro-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.keepedu-app-page .kanban-board-filtro-input,
.keepedu-app-page .kanban-board-filtro-select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
}

.keepedu-app-page .kanban-board-filtro-input:focus,
.keepedu-app-page .kanban-board-filtro-select:focus {
    outline: none;
    border-color: #2a8cdb;
    box-shadow: 0 0 0 3px rgba(42, 140, 219, 0.15);
}

.keepedu-app-page .kanban-filtro-resumo {
    font-size: 12px;
    color: #64748b;
}

.keepedu-app-page .kanban-btn-atualizar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
}

.keepedu-app-page .kanban-btn-atualizar .ke-btn-icon {
    display: inline-flex;
}

.keepedu-app-page .kanban-btn-atualizar.is-loading .ke-btn-icon svg {
    animation: kanban-refresh-spin 0.8s linear infinite;
}

@keyframes kanban-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

.keepedu-app-page .kanban-filtro-limpar {
    padding: 6px 12px;
    font-size: 12px;
}

.keepedu-app-page .kanban-board-vazio {
    margin: 0 4px 10px;
    font-size: 13px;
    color: #64748b;
}

.keepedu-app-page .kanban-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    min-height: 420px;
}

.keepedu-app-page .kanban-column {
    min-width: 300px;
    width: 300px;
    background: #eceff3;
    border: 1px solid #d7dce3;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.keepedu-app-page .kanban-column-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #d7dce3;
}

.keepedu-app-page .kanban-column-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.keepedu-app-page .kanban-column-title {
    margin: 0;
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #49566a;
    line-height: 1.3;
}

.keepedu-app-page .kanban-column-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d7dce3;
    color: #788394;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.keepedu-app-page .kanban-column-body {
    --kanban-cards-visiveis: 2;
    --kanban-card-slot: 330px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
    max-height: calc(
        var(--kanban-cards-visiveis) * var(--kanban-card-slot)
        + (var(--kanban-cards-visiveis) - 1) * 10px
        + 20px
    );
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: background .15s ease, box-shadow .15s ease;
}

.keepedu-app-page .kanban-column-body.is-drop-target {
    background: rgba(42, 140, 219, 0.08);
    box-shadow: inset 0 0 0 2px rgba(42, 140, 219, 0.35);
    border-radius: 0 0 8px 8px;
}

.keepedu-app-page .kanban-card {
    flex: 0 0 auto;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    cursor: grab;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    box-shadow: 0 1px 2px rgba(15, 42, 92, 0.04);
}

.keepedu-app-page .kanban-card:hover {
    border-color: #2a8cdb;
    box-shadow: 0 6px 18px rgba(42, 140, 219, 0.12);
}

.keepedu-app-page .kanban-card--atrasado {
    background: rgba(192, 57, 43, 0.1);
    border-color: rgba(180, 35, 24, 0.32);
}

.keepedu-app-page .kanban-card--atrasado:hover {
    border-color: rgba(180, 35, 24, 0.5);
    box-shadow: 0 6px 18px rgba(192, 57, 43, 0.14);
}

.keepedu-app-page .kanban-card--em-andamento {
    background: rgba(42, 140, 219, 0.1);
    border-color: rgba(42, 140, 219, 0.32);
}

.keepedu-app-page .kanban-card--em-andamento:hover {
    border-color: rgba(42, 140, 219, 0.5);
    box-shadow: 0 6px 18px rgba(42, 140, 219, 0.14);
}

.keepedu-app-page .kanban-card--concluido {
    background: rgba(42, 126, 68, 0.16);
    border-color: rgba(42, 126, 68, 0.42);
}

.keepedu-app-page .kanban-card--concluido:hover {
    border-color: rgba(42, 126, 68, 0.65);
    box-shadow: 0 6px 18px rgba(42, 126, 68, 0.18);
}

.keepedu-app-page .kanban-progress-fill--concluido {
    background: linear-gradient(90deg, #2a7e44, #4caf6e);
}

.keepedu-app-page .kanban-card.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
    transform: rotate(1deg);
}

.keepedu-app-page .kanban-card-top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.keepedu-app-page .kanban-card-icone {
    font-size: 14px;
    line-height: 1.2;
}

.keepedu-app-page .kanban-card-titulo {
    display: block;
    color: #3f4d61;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.keepedu-app-page .kanban-card-id {
    color: #788394;
    font-size: 12px;
    margin-bottom: 8px;
}

.keepedu-app-page .kanban-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.keepedu-app-page .kanban-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #eef2f6;
    color: #566273;
}

.keepedu-app-page .kanban-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #c0392b;
}

.keepedu-app-page .kanban-pill-dot--light {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.keepedu-app-page .kanban-pill--danger {
    background: #fdecea;
    color: #b42318;
}

.keepedu-app-page .kanban-pill--danger .kanban-pill-dot {
    background: #b42318;
}

.keepedu-app-page .kanban-pill--ok {
    background: #e8f7ee;
    color: #2a7e44;
}

.keepedu-app-page .kanban-pill--ok .kanban-pill-dot {
    background: #2a7e44;
}

.keepedu-app-page .kanban-pill--info {
    background: #e8f3fc;
    color: #1f6fb2;
}

.keepedu-app-page .kanban-pill--neutral {
    background: #eef2f6;
    color: #566273;
}

.keepedu-app-page .kanban-card-progresso {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #788394;
}

.keepedu-app-page .kanban-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #e6ebf1;
    overflow: hidden;
}

.keepedu-app-page .kanban-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2a8cdb, #5db6fb);
}

.keepedu-app-page .kanban-card-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #566273;
}

.keepedu-app-page .kanban-card-responsaveis {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.keepedu-app-page .kanban-card-responsavel {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.keepedu-app-page .kanban-responsavel-texto {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    line-height: 1.25;
}

.keepedu-app-page .kanban-responsavel-rotulo {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a95a5;
}

.keepedu-app-page .kanban-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #d7dce3;
    color: #49566a;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.keepedu-app-page .kanban-card-data {
    color: #788394;
}

.keepedu-app-page .kanban-card-data--conclusao {
    color: #2a7e44;
    font-weight: 600;
}

.keepedu-app-page .kanban-tag {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #efe4d8;
    color: #7a5535;
    font-size: 11px;
    font-weight: 600;
}

.keepedu-app-page .kanban-tag--serie {
    background: #efe6fb;
    color: #6b4f9b;
}

.keepedu-app-page .kanban-tag--status {
    background: #e8f3fc;
    color: #1f6fb2;
}

.keepedu-app-page .kanban-card-cartoes {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #788394;
}

.keepedu-app-page .kanban-card-historico {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(120, 131, 148, 0.2);
}

.keepedu-app-page .kanban-card-historico-titulo {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #788394;
}

.keepedu-app-page .kanban-card-historico-lista {
    margin: 0;
    padding: 0;
    list-style: none;
}

.keepedu-app-page .kanban-card-historico-item {
    display: grid;
    gap: 2px;
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 1.35;
    color: #5f6d80;
}

.keepedu-app-page .kanban-card-historico-linha {
    display: flex;
    align-items: center;
    gap: 6px;
}

.keepedu-app-page .kanban-card-historico-mais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    color: #5f6d80;
    background: rgba(120, 131, 148, 0.16);
}

.keepedu-app-page .kanban-pendencias-detalhe {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(120, 131, 148, 0.22);
}

.keepedu-app-page .kanban-pendencias-detalhe h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #3f4d61;
}

.keepedu-app-page .kanban-pendencias-carregando,
.keepedu-app-page .kanban-pendencias-vazio {
    margin: 0;
    font-size: 12px;
    color: #788394;
}

.keepedu-app-page .kanban-pendencias-lista {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.keepedu-app-page .kanban-pendencia-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: 10px;
    background: rgba(255, 251, 235, 0.9);
}

.keepedu-app-page .kanban-pendencia-corpo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.keepedu-app-page .kanban-pendencia-processo {
    font-size: 11px;
    line-height: 1.35;
    color: #8a5a1d;
}

.keepedu-app-page .kanban-pendencia-mais {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #9a3412;
    background: rgba(251, 146, 60, 0.22);
    flex-shrink: 0;
}

.keepedu-app-page .kanban-pendencia-texto,
.keepedu-app-page .kanban-pendencia-link {
    font-size: 12px;
    font-weight: 600;
    color: #9a3412;
    text-decoration: none;
}

.keepedu-app-page .kanban-pendencia-link:hover {
    text-decoration: underline;
}

.keepedu-app-page .kanban-historico-detalhe {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(120, 131, 148, 0.22);
}

.keepedu-app-page .kanban-historico-detalhe h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: #3f4d61;
}

.keepedu-app-page .kanban-historico-carregando {
    margin: 0;
    font-size: 12px;
    color: #788394;
}

.keepedu-app-page .kanban-historico-lista {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.keepedu-app-page .kanban-historico-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(120, 131, 148, 0.2);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.9);
}

.keepedu-app-page .kanban-historico-item-corpo {
    display: grid;
    gap: 3px;
    font-size: 12px;
    color: #5f6d80;
}

.keepedu-app-page .kanban-historico-item-corpo strong {
    color: #3f4d61;
    font-size: 13px;
}

.keepedu-app-page .kanban-historico-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.keepedu-app-page .kanban-board-erro {
    padding: 24px;
    color: #788394;
}

.keepedu-app-page .kanban-detalhe {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.keepedu-app-page .kanban-detalhe-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 6, 0.45);
}

.keepedu-app-page .kanban-detalhe-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100%);
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #d7dce3;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.keepedu-app-page .kanban-detalhe-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 18px 14px;
    border-bottom: 1px solid #e6ebf1;
}

.keepedu-app-page .kanban-detalhe-header-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.keepedu-app-page .kanban-detalhe-header-acoes .kanban-detalhe-btn-editar,
.keepedu-app-page .kanban-detalhe-header-acoes .kanban-detalhe-btn-excluir {
    min-width: 76px;
    min-height: 32px !important;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

.keepedu-app-page .kanban-detalhe-btn-excluir {
    border: 1px solid rgba(180, 35, 24, 0.35);
    border-radius: 3px;
    background: rgba(192, 57, 43, 0.1);
    color: #b42318;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.keepedu-app-page .kanban-detalhe-btn-excluir:hover {
    background: rgba(192, 57, 43, 0.18);
    border-color: rgba(180, 35, 24, 0.5);
    color: #9f2d1f;
}

.keepedu-app-page .kanban-detalhe-btn-excluir:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.keepedu-app-page .app-modal-confirm-dialog {
    max-width: 440px;
}

.keepedu-app-page .kanban-excluir-texto {
    margin: 0 0 10px;
    color: #566273;
    font-size: 14px;
    line-height: 1.5;
}

.keepedu-app-page .kanban-excluir-resumo {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #3f4d61;
    font-size: 13px;
    line-height: 1.45;
}

.keepedu-app-page .kanban-detalhe-titulo-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.keepedu-app-page .kanban-detalhe-titulo-wrap h3 {
    margin: 0;
    font-size: 18px;
    color: #3f4d61;
    line-height: 1.3;
}

.keepedu-app-page .kanban-detalhe-fechar {
    border: none;
    background: transparent;
    color: #788394;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.keepedu-app-page .kanban-detalhe-body {
    flex: 1;
    min-height: 0;
    padding: 16px 18px 24px;
    overflow-y: auto;
}

.keepedu-app-page .kanban-props {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.keepedu-app-page .kanban-prop {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 13px;
}

.keepedu-app-page .kanban-prop-label {
    color: #788394;
}

.keepedu-app-page .kanban-prop-value {
    color: #3f4d61;
    font-weight: 600;
}

.keepedu-app-page .kanban-prop-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.keepedu-app-page .kanban-form-editar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.keepedu-app-page .kanban-form-editar .kanban-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #566273;
}

.keepedu-app-page .kanban-form-editar .kanban-field > span {
    font-weight: 600;
}

.keepedu-app-page .kanban-form-editar .input-text,
.keepedu-app-page .kanban-form-editar select {
    width: 100%;
    box-sizing: border-box;
}

.keepedu-app-page .kanban-detalhe-acoes {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #e6ebf1;
}

.keepedu-app-page .kanban-detalhe-acoes .btn-primary,
.keepedu-app-page .kanban-detalhe-acoes .btn-light {
    flex: 1;
}

.keepedu-app-page .kanban-form-erro {
    margin: 0;
    color: #c0392b;
    font-size: 13px;
}

.keepedu-app-page .kanban-column-body::-webkit-scrollbar,
.keepedu-app-page .kanban-column::-webkit-scrollbar,
.keepedu-app-page .kanban-board::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.keepedu-app-page .kanban-column-body::-webkit-scrollbar-thumb,
.keepedu-app-page .kanban-column::-webkit-scrollbar-thumb,
.keepedu-app-page .kanban-board::-webkit-scrollbar-thumb {
    background: rgba(15, 42, 92, 0.25);
    border-radius: 8px;
}