﻿.tat-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1350;
    background: rgba(8, 11, 20, 0.55);
    backdrop-filter: blur(3px);
    animation: tatFadeIn 0.2s ease-out;
}

.tat-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1351;
    width: min(760px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--primary-bg-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.28);
    animation: tatSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tat-chat-sheet {
    width: min(560px, 100vw);
}

.dark-mode .tat-sheet {
    border-left-color: rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
}

.tat-sheet-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    padding: 18px 18px 18px 24px;
    color: #fff;
    background: radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 55%), var(--cdna-header-band);
}

.tat-sheet-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

    .tat-sheet-icon .mud-icon-root {
        color: #fff;
    }

.tat-sheet-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.tat-sheet-close.mud-icon-button {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

    .tat-sheet-close.mud-icon-button:hover {
        background: rgba(255, 255, 255, 0.24);
    }

    .tat-sheet-close.mud-icon-button .mud-icon-root {
        color: #fff;
    }

.tat-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.tat-sheet .notes-title {
    display: none;
}

.tat-sheet .section-wrapper {
    margin-bottom: 16px;
    padding: 18px;
    background: var(--secondary-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.dark-mode .tat-sheet .section-wrapper {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tat-sheet .section-title {
    margin: 0 0 14px 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--secondary-text-color);
}

.tat-sheet .empty-state {
    margin-bottom: 0;
    padding: 22px 16px;
    text-align: center;
    background: var(--primary-bg-color);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

.tat-sheet .empty-state-text {
    color: var(--secondary-text-color);
    font-size: 0.85rem;
}

.tat-sheet .modern-table {
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
}

.dark-mode .tat-sheet .modern-table {
    border-color: rgba(255, 255, 255, 0.08);
}

.tat-sheet .modern-table .mud-table-container,
.tat-sheet .modern-table .mud-table-pagination {
    background: var(--secondary-bg-color);
}

.tat-sheet .modern-table .mud-table-head .mud-table-cell,
.dark-mode .tat-sheet .modern-table .mud-table-head .mud-table-cell {
    color: var(--secondary-text-color) !important;
    background: var(--primary-bg-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.tat-sheet .modern-table .table-cell {
    color: var(--primary-text-color);
    font-size: 0.85rem;
}

.tat-sheet .modern-table .mud-table-cell {
    border-bottom-color: var(--border-color);
}

.tat-sheet .filename-link {
    color: var(--tenant-colour-primary);
    font-weight: 600;
}

.dark-mode .tat-sheet .filename-link {
    color: var(--primary-text-color);
}

.tat-sheet .owner-btn.mud-button-root,
.tat-sheet .table-actions-cell .mud-button-root {
    border-radius: 999px;
    border-color: var(--border-color);
    text-transform: none;
    font-weight: 600;
}

.tat-sheet .action-btn.mud-button-root {
    border-radius: 10px;
    padding: 6px 16px;
    text-transform: none;
    font-weight: 600;
    border-color: var(--border-color);
    color: var(--primary-text-color);
    background: var(--primary-bg-color);
}

    .tat-sheet .action-btn.mud-button-root:hover {
        border-color: var(--tenant-colour-primary);
        color: var(--tenant-colour-primary);
    }

.dark-mode .tat-sheet .action-btn.mud-button-root:hover {
    border-color: var(--primary-text-color);
    color: var(--primary-text-color);
}

.tat-chat-sheet .comms-panel {
    padding: 18px;
    background: var(--secondary-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.dark-mode .tat-chat-sheet .comms-panel {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes tatSlideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes tatFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) {
    overflow: hidden;
    border-radius: 20px;
    background: var(--secondary-bg-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.dark-mode .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title {
    position: relative;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 16px 64px 16px 24px;
    color: #fff;
    background: radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 55%), var(--cdna-header-band);
}

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title .mud-typography,
    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title .mud-icon-root {
        color: #fff;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title .mud-typography {
        font-size: 1.1rem;
        font-weight: 700;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title .mud-button-close {
        top: 50%;
        right: 14px;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

        .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) > .mud-dialog-title .mud-button-close:hover {
            background: rgba(255, 255, 255, 0.24);
        }

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content {
    padding: 20px 24px;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions {
    gap: 8px;
    padding: 14px 24px 18px 24px;
    border-top: 1px solid var(--border-color);
}

.dark-mode .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-root {
    min-height: 38px;
    padding: 6px 18px;
    border-radius: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    box-shadow: none;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-default,
.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-text {
    background: var(--primary-bg-color);
    border: 1px solid var(--border-color);
    color: var(--primary-text-color);
}

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-default:hover,
    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-text:hover {
        background: var(--tertiary-bg-color);
    }

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-primary,
.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-secondary,
.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-tertiary,
.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-info,
.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-success {
    background: var(--cdna-header-band);
    color: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--cdna-band-dark, #0c1524) 35%, transparent);
}

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-primary:hover,
    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled-success:hover {
        background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), var(--cdna-header-band);
    }

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-actions .mud-button-filled.mud-button-disabled {
    opacity: 0.5;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input-control {
    margin-top: 4px;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined {
    background: var(--primary-bg-color);
    border-radius: 10px;
    font-size: 14px;
}

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined .mud-input-outlined-border {
        border-color: var(--border-color);
        border-radius: 10px;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
        border-color: #b9c0cc;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border {
        border-width: 1px;
        border-color: var(--tenant-colour-primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--tenant-colour-primary) 18%, transparent);
    }

.dark-mode .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined:not(.mud-disabled):not(:focus-within):hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.3);
}

.dark-mode .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-input.mud-input-outlined:focus-within > .mud-input-outlined-border {
    border-color: var(--primary-text-color);
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--secondary-bg-color);
    box-shadow: none;
}

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table .mud-table-head .mud-table-cell {
        background: var(--primary-bg-color);
        color: var(--secondary-text-color);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.4px;
        text-transform: uppercase;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table .mud-table-cell {
        border-bottom-color: var(--border-color);
        font-size: 0.85rem;
    }

    .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table .mud-table-pagination {
        background: var(--secondary-bg-color);
    }

.dark-mode .mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table {
    border-color: rgba(255, 255, 255, 0.08);
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-table-striped .mud-table-row:nth-of-type(odd) {
    background: color-mix(in srgb, var(--primary-bg-color) 60%, transparent);
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-alert {
    border-radius: 12px;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-list-item {
    border-radius: 8px;
}

.mud-dialog-container .mud-dialog:not(:has(.pm)):not(:has(.tro-modern)) .mud-dialog-content .mud-list-subheader {
    padding-left: 8px;
    color: var(--secondary-text-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
