@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap');

#modal-kpi-actions-dialog {
    z-index: 1001 !important;
}

#modal-kpi-parent-dialog {
    z-index: 1002 !important;
}

#modal-kpi-actions-dialog > .e-dlg-overlay {
    z-index: 1000 !important;
}

#modal-kpi-parent-dialog > .e-dlg-overlay {
    z-index: 1001 !important;
}

#decision-detail-notes {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Shell ─────────────────────────────────────────────── */
#ev3-dialog {
    max-height: none !important;
}

    #ev3-dialog > .e-dlg-content {
        padding: 0;
    }

    #ev3-dialog .e-dialog {
        max-height: 100%;
        max-width: 100%;
    }

    #ev3-dialog div.e-content.e-lib.e-touch {
        height: calc(100% - 50px) !important;
        overflow: auto;
    }

@keyframes ev3-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ev3-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #f5f7fa;
    font-family: 'Rethink Sans', 'Segoe UI', sans-serif;
    animation: ev3-fade .25s ease;
}

/* ── Header ─────────────────────────────────────────────── */
.ev3-header {
    background: #fff;
    border-bottom: 1px solid #dde3ea;
    padding: 14px 24px 0;
    flex-shrink: 0;
}

.ev3-header-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 12px;
}

.ev3-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #013061;
    color: #C3D93D;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}

.ev3-emp-info {
    flex: 1;
}

.ev3-emp-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.ev3-emp-role {
    font-size: .8rem;
    color: #718096;
    display: block;
    margin-top: 1px;
}

.ev3-emp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
    margin-top: 4px;
}

    .ev3-emp-meta > span {
        font-size: .76rem;
        color: #718096;
    }

        .ev3-emp-meta > span b {
            color: #2d3748;
            font-weight: 600;
        }

.ev3-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ev3-header-overall {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    line-height: 1.15;
}

.ev3-header-overall-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ev3-header-overall-label {
    font-size: .62rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ev3-header-overall-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #013061;
}

.ev3-header-overall-legend {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border: 1.5px solid currentColor;
    border-radius: 10px;
}

    .ev3-header-overall-legend.item-1 {
        color: #3833FF;
    }

    .ev3-header-overall-legend.item-2 {
        color: #28A745;
    }

    .ev3-header-overall-legend.item-3 {
        color: #c9870a;
    }

    .ev3-header-overall-legend.item-4 {
        color: #dc3545;
    }

.ev3-formula-icon {
    font-size: 15px !important;
    cursor: help;
    opacity: .85;
    vertical-align: middle;
    margin-left: 4px;
}

.ev3-row-root .ev3-formula-icon,
.ev3-row-total .ev3-formula-icon {
    color: rgba(255,255,255,.95);
}

.ev3-row-mid .ev3-formula-icon {
    color: #1a5090;
}

.ev3-status-badge {
    font-size: 1rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 12px;
    white-space: nowrap;
    letter-spacing: .3px;
}

.ev3-close-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #718096;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

    .ev3-close-btn:hover {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #dc2626;
    }

    .ev3-close-btn .material-symbols-rounded {
        font-size: 18px;
    }

/* ── Actions bar ─────────────────────────────────────────── */
.ev3-actions-bar {
    border-top: 1px solid #edf2f7;
    background: #fff;
    min-height: 44px;
}

    .ev3-actions-bar .e-toolbar,
    .ev3-actions-bar .e-toolbar .e-toolbar-items,
    #ev3-dialog #ActionsToolbar,
    #ev3-dialog #ActionsToolbar .e-toolbar-items,
    #ev3-dialog #ActionsToolbar .e-toolbar-left,
    #ev3-dialog #ActionsToolbar .e-toolbar-right {
        background: #fff !important;
        border: none !important;
        box-shadow: none !important;
    }

/* ── Info bar ────────────────────────────────────────────── */
.ev3-infobar {
    background: #fff;
    border-bottom: 1px solid #edf2f7;
    padding: 7px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.ev3-legend-pill {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 600;
    border: 1.5px solid currentColor;
}

    .ev3-legend-pill.item-1 {
        color: #3833FF;
    }

    .ev3-legend-pill.item-2 {
        color: #28A745;
    }

    .ev3-legend-pill.item-3 {
        color: #c9870a;
    }

    .ev3-legend-pill.item-4 {
        color: #dc3545;
    }

.ev3-weight-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 10px;
    font-size: .76rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity .15s;
    margin-left: auto;
}

    .ev3-weight-pill:hover {
        opacity: .85;
    }

    .ev3-weight-pill.ok {
        background: #d1fae5;
        color: #065f46;
    }

    .ev3-weight-pill.bad {
        background: #fee2e2;
        color: #991b1b;
    }

    .ev3-weight-pill .material-symbols-rounded {
        font-size: 15px;
    }

/* ── Body ────────────────────────────────────────────────── */
.ev3-body {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

    .ev3-body .e-tab .e-tab-header {
        background: #fff;
        border-bottom: 2px solid #e2e8f0;
    }

    .ev3-body .e-tab .e-toolbar-item.e-active .e-tab-wrap {
        color: #013061;
        font-weight: 600;
    }

    .ev3-body .e-tab .e-content, .ev3-body .e-tab-panel, .ev3-body .e-item {
        overflow: visible !important;
        height: auto !important;
    }

/* ── KPI table ───────────────────────────────────────────── */
.ev3-kpi-wrap {
    margin: 0 20px 24px; /*border: 1px solid #dde3ea;*/
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: clip;
    background: #fff;
}

.ev3-kpi-table {
    width: 100%;
    border-collapse: collapse;
}

.ev3-col-header td {
    background: #013061;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .2px;
    padding: 13px 18px;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 5;
}

    .ev3-col-header td .e-label,
    .ev3-col-header td label {
        color: #fff !important;
        justify-content: center;
    }

.ev3-row-root td {
    background: #3a6fa9;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: 11px 12px;
    border: none;
    border-bottom: 2px solid #2c5485;
}

    .ev3-row-root td:first-child {
        padding-left: 16px;
    }

    .ev3-row-root td input.ev3-inp {
        background: transparent;
        color: #fff;
        font-weight: 700;
    }

.ev3-row-mid td {
    background: #fbfdff;
    color: #2d3748;
    font-weight: 600;
    font-size: .86rem;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f4f8;
}

    .ev3-row-mid td:first-child {
        padding-left: 28px; /*border-left: 6px solid #1a5090;*/
        box-shadow: inset 10px 0 0 0 #1a5090;
    }

    .ev3-row-mid td input.ev3-inp {
        background: transparent;
        color: #2d3748;
        font-weight: 600;
    }

.ev3-collapse-caret {
    font-size: 20px !important;
    cursor: pointer;
    color: #1a5090;
    user-select: none;
    border-radius: 4px;
    padding: 1px;
    transition: background .12s;
    flex-shrink: 0;
}

    .ev3-collapse-caret:hover {
        background: rgba(26,80,144,.12);
    }

.ev3-row-mid.ev3-mid-error td {
    background: #fff8f8;
}

    .ev3-row-mid.ev3-mid-error td:first-child {
        /* border-left: 6px solid #dc3545; */
        box-shadow: inset 10px 0 0 0 #dc3545;
    }

.ev3-row-leaf td {
    background: #fff;
    color: #374151;
    font-size: .85rem;
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
}

    .ev3-row-leaf td:first-child {
        border-left: 2px solid transparent;
    }

.ev3-row-leaf {
    cursor: pointer;
    transition: background .12s;
}

    .ev3-row-leaf:hover td {
        background: #f8faff;
    }

        .ev3-row-leaf:hover td:first-child {
            border-left-color: #93b4d8;
        }

    .ev3-row-leaf.ev3-active td {
        background: #eff6ff;
    }

        .ev3-row-leaf.ev3-active td:first-child {
            border-left-color: #013061;
        }

        .ev3-row-leaf.ev3-active td input.ev3-inp {
            background: #eff6ff;
        }

.ev3-row-total td {
    background: #013061;
    color: #fff;
    font-weight: 800;
    padding: 12px;
    border-top: 2px solid #01254e;
    border-bottom: none;
    letter-spacing: .2px;
}

    .ev3-row-total td:first-child {
        padding-left: 16px;
    }

.ev3-row-total input.ev3-inp {
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

.ev3-row-total .ev3-result-label {
    color: rgba(255,255,255,.78);
    font-weight: 600;
    font-size: .82rem;
}

.ev3-row-total .ev3-result-val {
    color: #C3D93D;
    font-size: 1rem;
    font-weight: 800;
}

.ev3-row-total .ev3-weight-err {
    border-color: #fca5a5 !important;
}

    .ev3-row-total .ev3-weight-err input.ev3-inp {
        color: #fecaca !important;
    }

.ev3-inp {
    text-align: center;
    width: 100%;
    height: 34px;
    border: none;
    outline: none;
    background: transparent;
    font-size: .85rem;
    border-radius: 4px;
    padding: 0 4px;
    transition: background .15s, box-shadow .15s;
    font-family: inherit;
    /* min-height: 45px;
       border: 1px solid #d1d9e0; */
}

    .ev3-inp:not(:disabled):focus {
        background: rgba(1,48,97,.07);
        box-shadow: inset 0 0 0 1.5px #013061;
    }

    .ev3-inp:disabled {
        cursor: default;
    }

.ev3-weight-err {
    border: 2px solid #dc3545 !important;
    border-radius: 6px;
    cursor: pointer;
}

    .ev3-weight-err input.ev3-inp {
        color: #dc3545 !important;
    }

.ev3-kids-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: .69rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    margin-top: 2px;
    line-height: 1.3;
}

.ev3-kids-ok {
    color: #065f46;
    background: #d1fae5;
}

.ev3-kids-err {
    color: #991b1b;
    background: #fee2e2;
}

.ev3-kids-badge .material-symbols-rounded {
    font-size: 10px;
}

.ev3-eval-cell {
    position: relative;
}

.ev3-range-tip {
    display: none;
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: #fff;
    font-size: .68rem;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.ev3-eval-cell:hover .ev3-range-tip {
    display: block;
}

.ev3-textarea {
    width: 100%;
    min-height: 45px;
    border: 1px solid #d1d9e0;
    resize: none;
    background: transparent;
    font-size: .83rem;
    border-radius: 4px;
    padding: 4px 6px;
    font-family: inherit;
    transition: background .15s, border-color .15s, box-shadow .15s;
}

    .ev3-textarea:not(:disabled):hover {
        border-color: #93b4d8;
    }

    .ev3-textarea:not(:disabled):focus {
        background: rgba(1,48,97,.04);
        border-color: #013061;
        box-shadow: inset 0 0 0 1px #013061;
        outline: none;
    }

    .ev3-textarea:disabled {
        cursor: default;
        border-color: #e9eef3;
    }

.ev3-warn {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #dc3545;
    font-size: 14px !important;
    pointer-events: none;
}

.ev3-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ev3-info-icon {
    font-size: 14px !important;
    color: #94a3b8;
    cursor: help;
    flex-shrink: 0;
}

.ev3-result-label {
    font-size: .8rem;
    color: #64748b;
}

.ev3-result-val {
    font-size: .95rem;
    font-weight: 700;
    color: #013061;
}

.ev3-section-title {
    margin: 28px 20px 0;
    padding: 13px 18px;
    background: #013061;
    border-radius: 8px 8px 0 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .ev3-section-title h4 {
        color: #fff;
        font-weight: 700;
        margin: 0;
        font-size: .95rem;
        letter-spacing: .2px;
    }

    .ev3-section-title::before {
        content: '';
        display: block;
        width: 4px;
        height: 18px;
        background: #0ea5e9;
        border-radius: 2px;
        flex-shrink: 0;
    }

.ev3-no-kpi {
    margin: 10px 20px;
    padding: 12px 16px;
    background: #fff;
    border-left: 3px solid #C3D93D;
    border-radius: 4px;
    color: #64748b;
    font-size: .87rem;
}

.ev3-card {
    margin: 12px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 16px 18px;
}

.ev3-card-role, .ev3-card-dept, .ev3-card-dev, .ev3-card-support, .ev3-informative-card {
    border-left: 4px solid #0ea5e9;
    background: #f8fbff;
}

/* Auto-growing rich text editor (Current Role & Responsibilities):
   no internal scroll, height expands to fit content. */
.ev3-rte-autoheight,
.ev3-rte-autoheight .e-rte-content {
    height: auto !important;
}

.ev3-rte-autoheight .e-rte-content .e-content {
    height: auto !important;
    min-height: 120px;
    max-height: none !important;
    overflow-y: visible !important;
}

.ev3-card-goals {
    margin: 0 20px 24px !important;
    border: 1px solid #dde3ea !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    background: #f8fbff;
    padding: 0;
}

    .ev3-card-goals > * {
        padding: 16px 18px;
    }

    .ev3-card-goals table {
        width: 100%;
        margin: 0;
    }

        .ev3-card-goals table thead tr th {
            padding: 8px 18px;
            background: #f1f5f9;
            color: #64748b;
            font-size: .72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .4px;
            border-bottom: 1px solid #e2e8f0;
        }

        .ev3-card-goals table tbody tr td {
            padding: 8px 18px;
            border-bottom: 1px solid #f3f4f6;
        }

.ev3-section-kpi h4, .ev3-section-goals h4 {
    color: #fff;
}

#ev3-dialog .e-toolbar .e-toolbar-items {
    background: #fff;
}

#ev3-dialog .e-toolbar {
    min-height: 45px;
}

#ev3-dialog .e-grid .e-rowcell {
    border: 0;
}

#ev3-dialog .e-grid .e-table {
    border-collapse: collapse;
}

.ev3-adj-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f4f8;
}

.ev3-adj-input {
    width: 100px;
    text-align: center;
    border: 1px solid #d1d9e0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: .85rem;
}

.ev3-col-header > .custom-label {
    justify-content: center;
}

/* Manage-KPIs grid toolbar (was inline style inside ToolbarTemplate) */
#manage-kpis-grid .e-toolbar {
    height: 103px !important;
}
