﻿.tm-root {
    font-family: var(--HeadingFont) !important;
    padding: 24px;
    background: #F7F5FB;
    min-height: 100vh;
}

.tm-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.tm-page-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: radial-gradient(circle, #2e77f2, #59c7fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgb(89 199 250 / 34%);
}

.tm-page-title {
    margin: 0;
    font-size: 20px;
    color: #212121;
}

.tm-page-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: #6B7280;
}
.tm-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 24px;
    flex-wrap: wrap;
    /* REMOVED: overflow: hidden  ← this was clipping the negative margin */
}

.tm-tab {
    padding: 10px 20px;
    font-size: 14px;
    color: #6B7280;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all .18s;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    /* ADD: prevent the tab itself from creating a stacking context */
    position: relative;
    z-index: 1;
}

    .tm-tab:hover {
        color: #fff;
        background: radial-gradient(circle, #2e77f2, #59c7fa);
    }

    .tm-tab.active {
        color: #fff;
        border-bottom-color: #2e77f2;
        background: radial-gradient(circle, #2e77f2, #59c7fa);
    }

    .tm-tab .badge {
        background: #f59e0b;
        color: #fff;
        font-size: 11px;
        border-radius: 10px;
        padding: 1px 7px;
        font-weight: 700;
    }

.tm-card {
    background: #fff;
    border-radius: 16px;
    font-family: var(--HeadingFont) !important;
    border: 1px solid #E5E7EB;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.tm-card-title {
    font-size: 15px;
    color: #212121;
    margin: 0 0 18px;
    display: flex;
    font-family: var(--HeadingFont) !important;
    align-items: center;
    gap: 8px;
}

    .tm-card-title .icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: #eff6ff;
        color: #47a5f6;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.tm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

@media (max-width: 768px) {
    .tm-form-grid {
        grid-template-columns: 1fr;
    }
}

.tm-label {

    color: #374151;
    margin-bottom: 6px;
    display: block;
    font-family: var(--HeadingFont) !important;
}

.TableRow table tr th span {
    font-weight: 400;
}

/* ── Role Matrix Table ── */
.role-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 4px;
    font-family: var(--HeadingFont) !important;
}

    .role-matrix-table thead tr {
        border-bottom: 1px solid #E5E7EB;
    }

    .role-matrix-table th {
        padding: 8px 12px;
        font-size: 11px;
        font-weight: 700;
        color: #6B7280;
        text-transform: uppercase;
        letter-spacing: .5px;
        font-family: var(--HeadingFont) !important;
    }

        .role-matrix-table th:first-child {
            text-align: left;
        }

        .role-matrix-table th:not(:first-child) {
            text-align: center;
        }

    .role-matrix-table td {
        padding: 10px 12px;
        border-bottom: 0.5px solid #F3F4F6;
        vertical-align: middle;
        font-family: var(--HeadingFont) !important;
    }

        .role-matrix-table td:first-child {
            font-size: 13px;
            color: #212121;
        }

        .role-matrix-table td:not(:first-child) {
            text-align: center;
        }

    .role-matrix-table tbody tr:last-child td {
        border-bottom: none;
    }

    .role-matrix-table tbody tr:hover td {
        background: #FAFAFE;
    }

.role-always-on {
    font-size: 11px;
    color: #9CA3AF;
    font-style: italic;
}

.mandatory-note-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 6px;
    color: #92400E;
    font-size: 11px;
    font-weight: 600;
}

.note-muted {
    color: #D1D5DB;
    font-family: var(--HeadingFont) !important;
}

.note-hint {
    color: #9CA3AF;
    font-family: var(--HeadingFont) !important;
}

/* ── Tile rows in drag section ── */
.tile-builder {
    border: 1.5px dashed #C4B5FD;
    border-radius: 12px;
    padding: 16px;
    background: #FAFAFE;
}

.tile-builder-header {
    font-size: 13px;
    font-weight: 700;
    color: #3B82F6;
    margin-bottom: 12px;
}

.tile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: grab;
    transition: box-shadow .15s, transform .1s;
}

    .tile-row:hover {
        box-shadow: 0 4px 14px rgba(124,58,237,.15);
        transform: translateY(-1px);
    }

    .tile-row.drag-over {
        border-color: #7C3AED;
        background: #F3EEFF;
    }

.tile-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.drag-handle {
    color: #9CA3AF;
    font-size: 16px;
}

.tile-order {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #EFF6FF;
    color: #3B82F6;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-name {
    font-size: 14px;
    font-weight: 600;
    color: #1E1B4B;
}

.tile-roles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.role-badge {
    padding: 2px 7px;
    border-radius: 6px;
}

.role-badge-SA {
    background: #EFF6FF;
    color: #3B82F6;
}

.role-badge-CA {
    background:#EFF6FF;
    color: #1D4ED8;
}

.role-badge-CO {
    background: #D1FAE5;
    color: #065F46;
}

.role-badge-AG {
    background: #FEF9C3;
    color: #854D0E;
}

.role-badge-SUB {
    background: #FEE2E2;
    color: #991B1B;
}

.mandatory-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 6px;
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 16px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ── Save button ── */
.tm-save-btn {
    background: radial-gradient(circle, rgb(46, 119, 242), rgb(89, 199, 250));
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 12px rgba(124,58,237,.3) !important;
    font-size: 14px !important;
    transition: box-shadow .2s, transform .1s !important;
}

    .tm-save-btn:hover {
        background: radial-gradient(circle, rgb(46, 119, 242), rgb(89, 199, 250));
        box-shadow: 0 6px 18px rgba(124,58,237,.45) !important;
        transform: translateY(-1px) !important;
    }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #9CA3AF;
    font-size: 14px;
}

    .empty-state .empty-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }

/* ── Step hint ── */
.step-hint {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #1D4ED8;
    font-family: var(--HeadingFont) !important;
}

/* ── Step divider ── */
.step-divider {
    font-size: 11px;
    font-weight: 700;
    color: #7C3AED;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .step-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #EDE9FE;
    }

.tiles_RoleTable span.rz-cell-data.rz-text-truncate {
    height: 35px !important;
}

/* ════════════════════════════════════════════
   TAB 3 – MANDATORY TILES
════════════════════════════════════════════ */

/* Metric summary cards */
.mand-metric-card {
    background: #EFF6FF;
    border: 1px solid #3B82F6;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
}

.mand-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: #3B82F6;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.mand-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1E1B4B;
}

/* Mandatory role chip used in the mandatory grid */
.mandatory-role-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    display: inline-block;
}

/* ── Wizard step indicator ───────────────────────────── */
.wiz-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
}

.wiz-step {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.wiz-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #D1D5DB;
    background: #fff;
    color: #9CA3AF;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    z-index: 1;
}

.wiz-step.done .wiz-step-num {
    background: #10B981;
    border-color: #10B981;
    color: #fff;
}

.wiz-step.active .wiz-step-num {
    background: #2e77f2;
    border-color: #2e77f2;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(46,119,242,.18);
}

.wiz-step-label {
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    line-height: 1.3;
    white-space: nowrap;
}

.wiz-step.done .wiz-step-label {
    color: #10B981;
}

.wiz-step.active .wiz-step-label {
    color: #2e77f2;
}

.wiz-step-line {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin: 0 6px;
    transition: background .2s;
}

    .wiz-step-line.done {
        background: #10B981;
    }

/* ── Queue list ─────────────────────────────────────── */
.queue-empty {
    text-align: center;
    padding: 28px;
    color: #9CA3AF;
    font-size: 13px;
    border: 1.5px dashed #E5E7EB;
    border-radius: 12px;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: grab;
    transition: box-shadow .15s, transform .1s;
    gap: 10px;
}

    .queue-item:hover {
        box-shadow: 0 4px 14px rgba(46,119,242,.12);
        transform: translateY(-1px);
    }

    .queue-item.drag-over {
        border-color: #2e77f2;
        background: #EFF6FF;
    }

.queue-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.queue-item-right {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Pending tile banner ──────────────────────────── */
.pending-tile-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #EFF6FF;
    border: 1.5px solid #93C5FD;
    border-radius: 12px;
    margin-bottom: 16px;
}

.pending-tile-name {
    font-size: 15px;
    font-weight: 700;
    color: #1D4ED8;
}

.pending-tile-hint {
    font-size: 12px;
    color: #3B82F6;
    margin-top: 2px;
}

/* ── Role assignment table ────────────────────────── */
.role-assign-table {
    width: 100%;
    border-collapse: collapse;
}

    .role-assign-table th {
        font-size: 11px;
        font-weight: 700;
        color: #6B7280;
        text-transform: uppercase;
        letter-spacing: .5px;
        padding: 8px 12px;
        border-bottom: 2px solid #E5E7EB;
        text-align: left;
    }

        .role-assign-table th.center {
            text-align: center;
        }

    .role-assign-table td {
        padding: 11px 12px;
        border-bottom: 0.5px solid #F3F4F6;
        vertical-align: middle;
    }

    .role-assign-table tbody tr:last-child td {
        border-bottom: none;
    }

    .role-assign-table tbody tr:hover td {
        background: #F9FAFB;
    }

    .role-assign-table td.center {
        text-align: center;
    }

.role-row-name {
    font-size: 13px;
    font-weight: 600;
    color: #212121;
}

.role-row-hint {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 2px;
}

/* ── Confirm-add bar ──────────────────────────────── */
.confirm-add-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.confirm-add-bar-hint {
    font-size: 12px;
    color: #6B7280;
}

/* ── Summary ──────────────────────────────────────── */
.summary-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 10px;
}

/* ── Mandatory Tiles tab ──────────────────────────── */
.mand-table-wrap {
    overflow-x: auto;
}

.mand-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .mand-grid-table thead tr {
        background: #EFF6FF;
    }

    .mand-grid-table th {
        padding: 10px 14px;
        font-size: 11px;
        font-weight: 700;
        color: #2563EB;
        text-transform: uppercase;
        letter-spacing: .5px;
        text-align: left;
        white-space: nowrap;
    }

    .mand-grid-table td {
        padding: 12px 14px;
        border-bottom: 0.5px solid #F3F4F6;
        vertical-align: middle;
    }

    .mand-grid-table tbody tr:last-child td {
        border-bottom: none;
    }

    .mand-grid-table tbody tr:hover td {
        background: #FAFAFE;
    }

.mand-tile-name-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #212121;
}

.lock-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    white-space: nowrap;
}

.corp-primary {
    font-size: 13px;
    font-weight: 600;
    color: #212121;
}

.corp-secondary {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 2px;
}

/* ── Metric cards ─────────────────────────────────── */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 14px 18px;
    text-align: center;
}

.metric-card-label {
    font-size: 11px;
    font-weight: 700;
    color: #2563EB;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.metric-card-value {
    font-size: 26px;
    font-weight: 700;
    color: #1E1B4B;
}

/* ── Edit dialog ──────────────────────────────────── */
.edit-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-dialog-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    width: 580px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    max-height: 90vh;
    overflow-y: auto;
}

.edit-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.edit-dialog-title {
    font-size: 16px;
    font-weight: 700;
    color: #1E1B4B;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9CA3AF;
    line-height: 1;
}

    .close-btn:hover {
        color: #374151;
    }

/* ── Validation hint ──────────────────────────────── */
.step1-validation-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 10px;
    font-size: 13px;
    color: #92400E;
    margin-bottom: 16px;
}
