/**
 * Public styles for Team Sharing Document and Media Tracker.
 */

/* ---- Add User form -------------------------------------------------------- */

.ts-dmt-add-user-wrap {
    width: 100%;
    margin: 1.5em 0;
}

/* Status banner (success / error) */
.ts-dmt-add-user-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-top: 0.75em;
    display: none;
}

.ts-dmt-add-user-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-add-user-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form fields */
.ts-dmt-add-user-form .ts-dmt-field {
    margin-bottom: 1em;
}

.ts-dmt-add-user-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3em;
}

.ts-dmt-add-user-form .required {
    color: #c00;
}

.ts-dmt-add-user-form input[type="text"],
.ts-dmt-add-user-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
}

.ts-dmt-add-user-form input.ts-dmt-error {
    border-color: #c00;
}

.ts-dmt-field-error {
    display: block;
    color: #c00;
    font-size: 0.875em;
    margin-top: 0.25em;
    min-height: 1.1em;
}

/* Submit row */
.ts-dmt-submit-row {
    margin-top: 1.2em;
}

.ts-dmt-add-user-form .ts-dmt-btn {
    padding: 0.5em 1.4em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
}

.ts-dmt-add-user-form .ts-dmt-btn:hover {
    background: #005d8c;
}

.ts-dmt-add-user-form .ts-dmt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* CSV import toggle */
.ts-dmt-csv-toggle-label {
    font-weight: normal !important;
    cursor: pointer;
}

/* Group checkbox description (not bold) */
.ts-dmt-group-description {
    font-weight: normal;
    color: #666;
    margin-left: 0.25em;
}

.ts-dmt-csv-toggle-label input {
    margin-right: 0.3em;
}

/* CSV preview table */
.ts-dmt-csv-preview-area h4 {
    margin: 1em 0 0.3em;
}

.ts-dmt-csv-preview-summary {
    margin-bottom: 0.5em;
    font-style: italic;
}

.ts-dmt-csv-preview-table {
    border-collapse: collapse;
    font-size: 0.9em;
}

.ts-dmt-csv-preview-table th,
.ts-dmt-csv-preview-table td {
    text-align: left;
    padding: 0.35em 0.6em;
    border: 1px solid #ddd;
}

.ts-dmt-csv-preview-table thead th {
    background: #f0f0f0;
}

.ts-dmt-csv-row-error {
    background: #fff3f3;
}

.ts-dmt-csv-row-error td:last-child {
    color: #c00;
    font-weight: 600;
}

/* CSV results area */
.ts-dmt-csv-results {
    margin-top: 1.5em;
}

.ts-dmt-csv-results h4 {
    margin: 0 0 0.3em;
}

.ts-dmt-csv-results-summary {
    margin-bottom: 0.6em;
}

.ts-dmt-csv-preview-btn {
    margin-top: 0.5em;
}

/* Extra spacing below the CSV fields block so it doesn't crowd the User Groups fieldset */
.ts-dmt-csv-fields {
    margin-bottom: 1.5em;
}

.ts-dmt-csv-preview-area {
    margin-bottom: 1.5em;
}

/* ---- Upload Asset form ---------------------------------------------------- */

.ts-dmt-upload-asset-wrap {
    max-width: 520px;
    margin: 1.5em 0;
}

.ts-dmt-upload-asset-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-bottom: 1em;
    display: none;
}

.ts-dmt-upload-asset-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-upload-asset-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-dmt-upload-asset-form .ts-dmt-field {
    margin-bottom: 1em;
}

.ts-dmt-upload-asset-form label,
.ts-dmt-upload-asset-form legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3em;
}

.ts-dmt-upload-asset-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.ts-dmt-upload-asset-form input[type="text"],
.ts-dmt-upload-asset-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
}

.ts-dmt-upload-asset-form input[type="file"] {
    display: block;
    margin-top: 0.2em;
}

.ts-dmt-upload-asset-form input.ts-dmt-error,
.ts-dmt-upload-asset-form select.ts-dmt-error {
    border-color: #c00;
}

.ts-dmt-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    margin-top: 0.3em;
}

.ts-dmt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: normal;
    cursor: pointer;
}

/* Applied to a checkbox label when a special group makes it mutually exclusive */
.ts-dmt-cb-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ts-dmt-upload-asset-form .ts-dmt-btn {
    padding: 0.5em 1.4em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
}

.ts-dmt-upload-asset-form .ts-dmt-btn:hover {
    background: #005d8c;
}

.ts-dmt-upload-asset-form .ts-dmt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- List Assets ---------------------------------------------------------- */

.ts-dmt-list-assets-wrap {
    margin: 1.5em 0;
}

.ts-dmt-list-assets-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-bottom: 1em;
    display: none;
}

.ts-dmt-list-assets-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-list-assets-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-dmt-list-assets-messages .ts-dmt-warning-note {
    margin: 0.4em 0 0;
    padding: 0;
    color: #856404;
    font-size: 0.9em;
}

/* Filters row */
/* Shared filter row */
.ts-dmt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.ts-dmt-filter-group label {
    font-weight: 600;
    font-size: 0.85em;
}

.ts-dmt-filter-group input[type="search"],
.ts-dmt-filter-group select {
    padding: 0.3em 0.5em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.95em;
}

.ts-dmt-filter-group input[type="search"] {
    min-width: 140px;
}

/* List-assets toolbar (status + search + export) */
.ts-dmt-list-assets-toolbar {
    margin-bottom: 0.5em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

/* List-assets filters (collapsible) */
.ts-dmt-list-assets-filters {
    margin-bottom: 1em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

.ts-dmt-filter-group-btn {
    align-self: flex-end;
}

/* User-assets toolbar */
.ts-dmt-ua-list-toolbar {
    margin-bottom: 0.5em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

/* User-assets filters (collapsible) */
.ts-dmt-ua-list-filters {
    margin-bottom: 1em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

/* Table */
.ts-dmt-list-assets-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.ts-dmt-list-assets-table th,
.ts-dmt-list-assets-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: middle;
}

.ts-dmt-list-assets-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    white-space: nowrap;
}

/* Sortable headers */
.ts-dmt-sortable {
    cursor: pointer;
    user-select: none;
}

.ts-dmt-sortable:hover,
.ts-dmt-sortable:focus {
    background: #e5e5e5;
}

.ts-dmt-sort-indicator::after {
    content: '\2195'; /* ↕ up-down arrow */
    margin-left: 0.3em;
    opacity: 0.4;
}

.ts-dmt-sortable[aria-sort="ascending"] .ts-dmt-sort-indicator::after {
    content: '\25B2'; /* ▲ */
    opacity: 1;
}

.ts-dmt-sortable[aria-sort="descending"] .ts-dmt-sort-indicator::after {
    content: '\25BC'; /* ▼ */
    opacity: 1;
}

/* Status badges */
.ts-dmt-status-badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: capitalize;
}

.ts-dmt-status-live {
    background: #d4edda;
    color: #155724;
}

.ts-dmt-status-archived {
    background: #e2e3e5;
    color: #383d41;
}

/* Action buttons */
.col-actions {
    white-space: nowrap;
}

.col-actions .button + .button {
    margin-left: 0.3em;
}

/* Icon-only action buttons */
.ts-dmt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    padding: 0;
    line-height: 1;
}

.ts-dmt-icon-btn svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    pointer-events: none;
}

.ts-dmt-icon-btn .material-icons {
    font-size: 1.1em;
    line-height: 1;
    pointer-events: none;
}

.ts-dmt-icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: inherit;
    color: inherit;
}

.ts-dmt-toggle-status-row-btn[data-status="live"] {
    color: #7e5312;
}

.ts-dmt-toggle-status-row-btn[data-status="archived"] {
    color: #0073aa;
}

/* No-assets placeholder */
.ts-dmt-no-assets td {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ---- Edit modal / overlay ------------------------------------------------- */

.ts-dmt-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.ts-dmt-modal-overlay[hidden] {
    display: none;
}

.ts-dmt-modal {
    background: #fff;
    border-radius: 6px;
    padding: 1.5em 2em;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.ts-dmt-modal h3 {
    margin-top: 0;
}

.ts-dmt-modal-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-bottom: 1em;
    display: none;
}

.ts-dmt-modal-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-modal-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-dmt-edit-asset-form .ts-dmt-field {
    margin-bottom: 1em;
}

.ts-dmt-edit-asset-form label,
.ts-dmt-edit-asset-form legend {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3em;
}

.ts-dmt-edit-asset-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.ts-dmt-edit-asset-form input[type="text"],
.ts-dmt-edit-asset-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4em 0.6em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
}

.ts-dmt-edit-asset-form input.ts-dmt-error,
.ts-dmt-edit-asset-form select.ts-dmt-error {
    border-color: #c00;
}

/* Status toggle button colours */
.ts-dmt-toggle-status-btn.ts-dmt-btn-live {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.ts-dmt-toggle-status-btn.ts-dmt-btn-archived {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

/* Modal action buttons */
.ts-dmt-modal-actions {
    margin-top: 1.2em;
    display: flex;
    gap: 0.6em;
}

/* ---- User Assets list & viewer -------------------------------------------- */

.ts-dmt-user-assets-wrap {
    margin: 1.5em 0;
}

.ts-dmt-user-assets-messages,
.ts-dmt-ua-viewer-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-bottom: 1em;
    display: none;
}

.ts-dmt-user-assets-messages.ts-dmt-success,
.ts-dmt-ua-viewer-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-user-assets-messages.ts-dmt-error,
.ts-dmt-ua-viewer-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Table */
.ts-dmt-user-assets-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.ts-dmt-user-assets-table th,
.ts-dmt-user-assets-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: middle;
}

.ts-dmt-user-assets-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    white-space: nowrap;
}

.ts-dmt-view-asset-link {
    cursor: pointer;
    text-decoration: underline;
    color: #0073aa;
}

.ts-dmt-view-asset-link:hover {
    color: #005d8c;
}

/* Viewer section */
.ts-dmt-ua-viewer-section[hidden] {
    display: none;
}

.ts-dmt-ua-back-btn {
    margin-bottom: 1em;
}

.ts-dmt-ua-viewer-header {
    margin-bottom: 1em;
}

.ts-dmt-ua-viewer-header h3 {
    margin: 0 0 0.2em;
}

.ts-dmt-ua-viewer-header p {
    margin: 0.15em 0 0;
    color: #555;
    font-size: 0.9em;
}

.ts-dmt-ua-viewer-header p[hidden] {
    display: none;
}

/* Embedded content */
.ts-dmt-ua-pdf-frame {
    width: 100%;
    height: 80vh;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.ts-dmt-ua-video-player {
    width: 100%;
    max-width: 900px;
    border-radius: 3px;
}

.ts-dmt-ua-viewer-content {
    margin-bottom: 1.5em;
}

/* Acceptance form */
.ts-dmt-ua-acceptance-form .ts-dmt-checkbox-label {
    font-weight: normal;
}

.ts-dmt-ua-acceptance-form .ts-dmt-submit-row {
    margin-top: 1em;
}

.ts-dmt-ua-acceptance-field {
    margin-top: 1em;
}

.ts-dmt-ua-comment-field label {
    margin-bottom: 0.25em;
    display: block;
}

.ts-dmt-ua-comment-field textarea {
    margin-top: 0;
    width: 100%;     /* FH */
    box-sizing: border-box;  /* FH */
}

/* comment history */
.ts-dmt-comment-item {
    border-left: 4px solid #aaa;
    background: #eee;
    padding: 10px;
    margin-bottom:15px;
}
.ts-dmt-response-item {
    padding-left: 20px;
}

.ts-dmt-comment-header {
    font-weight: 600;
    margin-bottom: 2px;
    margin-top: 4px;
}  

 .ts-dmt-response-header {
    font-weight: 600;
    font-style: italic;
    margin-bottom: 2px;
    margin-top: 4px;
}  

.ts-dmt-response-author, .ts-dmt-comment-author {
    font-weight: 600;
}

.ts-dmt-response-date, .ts-dmt-comment-date {
    font-weight: 400;
    font-style: normal;
}

.ts-dmt-comment-closed-note {
    margin-top: 8px;
    font-size: 0.875em;
    font-style: italic;
    color: #555;
}

.ts-dmt-comment-privacy-note {
    margin-top: 6px;
    font-size: 0.875em;
    font-style: italic;
    color: #555;
}

/* =========================================================================
   [ts_dmt_comments] — Review Comments tabbed UI
   ========================================================================= */

.ts-dmt-review-wrap {
    max-width: 960px;
}

.ts-dmt-review-messages {
    display: none;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 14px;
}
.ts-dmt-review-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.ts-dmt-review-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---- Tabs ---- */
.ts-dmt-review-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ccc;
    margin-bottom: 16px;
}
.ts-dmt-review-tab {
    padding: 8px 18px;
    border: 1px solid transparent;
    border-bottom: none;
    background: #f1f1f1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    border-radius: 4px 4px 0 0;
    margin-bottom: -2px;
    transition: background 0.15s, color 0.15s;
}
.ts-dmt-review-tab:hover {
    background: #e4e4e4;
    color: #333;
}
.ts-dmt-review-tab.active {
    background: #fff;
    color: #0073aa;
    border-color: #ccc;
    border-bottom: 2px solid #fff;
    font-weight: 600;
}

/* ---- Scrollable table wrapper ---- */
.ts-dmt-review-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Summary & users tables ---- */
.ts-dmt-review-table {
    width: 100%;
    border-collapse: collapse;
}
.ts-dmt-review-table th,
.ts-dmt-review-table td {
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap;
}
.ts-dmt-review-table tbody tr:hover {
    background: #f7f7f7;
}

/* ---- Panel header (back button + title) ---- */
.ts-dmt-review-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ts-dmt-review-panel-title {
    font-size: 15px;
    font-weight: 600;
}

/* ---- Thread view ---- */
.ts-dmt-review-thread-body .ts-dmt-comment-item {
    border-left: 4px solid #aaa;
    background: #f9f9f9;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
}
.ts-dmt-review-thread-body .ts-dmt-response-item {
    border-left: 4px solid #0073aa;
    background: #eef6fc;
    padding: 10px 14px;
    margin: 6px 0 12px 24px;
    border-radius: 0 4px 4px 0;
}

/* ---- Response form in thread ---- */
.ts-dmt-review-respond-form {
    margin-top: 18px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.ts-dmt-review-respond-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.ts-dmt-review-respond-form .ts-dmt-field-error {
    display: block;
    color: #dc3232;
    font-size: 13px;
    margin-bottom: 6px;
}
.ts-dmt-review-respond-actions {
    display: flex;
    gap: 8px;
}

/* ---- Hide Comment Text button ---- */
.ts-dmt-comment-actions {
    margin-top: 6px;
}
.ts-dmt-review-hide-comment-btn {
    color: #a00 !important;
    border-color: #c0392b !important;
    background: #fff !important;
    font-size: 12px;
}
.ts-dmt-review-hide-comment-btn:hover {
    background: #fdecea !important;
    border-color: #a00 !important;
}

/* ---- Hidden comment text placeholder ---- */
.ts-dmt-comment-hidden-text {
    color: #888;
    font-style: italic;
}

/* =========================================================================
   [ts_dmt_list_users] — table, filters & edit form
   ========================================================================= */

.ts-dmt-list-users-wrap {
    max-width: 960px;
}

.ts-dmt-list-users-messages {
    display: none;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 14px;
}
.ts-dmt-list-users-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.ts-dmt-list-users-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-dmt-list-users-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.ts-dmt-list-users-filters label {
    font-weight: 600;
}
.ts-dmt-list-users-filters input[type="search"] {
    min-width: 220px;
}

.ts-dmt-list-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}
.ts-dmt-list-users-table th,
.ts-dmt-list-users-table td {
    padding: 8px 10px;
    text-align: left;
}
.ts-dmt-list-users-table thead th {
    background: #f1f1f1;
}

.ts-dmt-no-users td {
    text-align: center;
    font-style: italic;
}

.ts-dmt-edit-user-form .ts-dmt-field {
    margin-bottom: 12px;
}
.ts-dmt-edit-user-form label,
.ts-dmt-edit-user-form legend {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.ts-dmt-edit-user-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}
.ts-dmt-edit-user-form input[type="text"],
.ts-dmt-edit-user-form input[type="email"],
.ts-dmt-edit-user-form select {
    width: 100%;
    max-width: 360px;
}
.ts-dmt-edit-user-form input.ts-dmt-error,
.ts-dmt-edit-user-form select.ts-dmt-error {
    border-color: #dc3545;
}

/* ---- Reports (by document / by user) -------------------------------------- */

.ts-dmt-report-doc-wrap,
.ts-dmt-report-user-wrap {
    margin: 1.5em 0;
}

/* Toolbar */
.ts-dmt-report-toolbar {
    margin-bottom: 0.5em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

/* Collapsible filters */
.ts-dmt-report-doc-filters,
.ts-dmt-report-user-filters {
    margin-bottom: 1em;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75em;
}

/* Tables */
.ts-dmt-report-doc-table,
.ts-dmt-report-user-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.ts-dmt-report-doc-table th,
.ts-dmt-report-doc-table td,
.ts-dmt-report-user-table th,
.ts-dmt-report-user-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: middle;
}

.ts-dmt-report-doc-table thead th,
.ts-dmt-report-user-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    white-space: nowrap;
}

/* No-data placeholder */
.ts-dmt-no-data td {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ---- Circular progress indicator ------------------------------------------ */

.ts-dmt-progress-ring {
    vertical-align: middle;
}
.ts-dmt-progress-text {
    font-size: 10px;
    fill: #333;
    font-weight: 600;
}

/* Detail column (… button) */
.ts-dmt-rd-detail-col,
.ts-dmt-ru-detail-col {
    width: 3em;
}
.col-detail {
    text-align: center;
    white-space: nowrap;
}

/* ---- Report-by-asset detail overlay --------------------------------------- */

.ts-dmt-rd-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ts-dmt-rd-detail-overlay[hidden] {
    display: none;
}

.ts-dmt-rd-detail-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 860px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.ts-dmt-rd-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid #e2e4e7;
    flex-shrink: 0;
}
.ts-dmt-rd-detail-header h3 {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
}
.ts-dmt-rd-detail-actions {
    display: flex;
    gap: 0.5em;
    flex-shrink: 0;
}

.ts-dmt-rd-detail-body {
    overflow-y: auto;
    padding: 1em 1.25em;
    flex: 1 1 auto;
}

.ts-dmt-rd-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.ts-dmt-rd-detail-table th,
.ts-dmt-rd-detail-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: middle;
}
.ts-dmt-rd-detail-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ---- Report-by-user detail overlay ---------------------------------------- */

.ts-dmt-ru-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ts-dmt-ru-detail-overlay[hidden] {
    display: none;
}

.ts-dmt-ru-detail-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 860px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.ts-dmt-ru-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.25em;
    border-bottom: 1px solid #e2e4e7;
    flex-shrink: 0;
}
.ts-dmt-ru-detail-header h3 {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
}
.ts-dmt-ru-detail-actions {
    display: flex;
    gap: 0.5em;
    flex-shrink: 0;
}

.ts-dmt-ru-detail-body {
    overflow-y: auto;
    padding: 1em 1.25em;
    flex: 1 1 auto;
}

.ts-dmt-ru-detail-table {
    width: 100%;
    border-collapse: collapse;
}
.ts-dmt-ru-detail-table th,
.ts-dmt-ru-detail-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: middle;
}
.ts-dmt-ru-detail-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* =========================================================================
   [ts_dmt_user_profile] — User Profile
   ========================================================================= */

.ts-dmt-user-profile-wrap {
    max-width: 640px;
    margin: 1.5em 0;
}

.ts-dmt-user-profile-messages {
    padding: 0.6em 1em;
    border-radius: 3px;
    margin-bottom: 1em;
    display: none;
}

.ts-dmt-user-profile-messages.ts-dmt-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-dmt-user-profile-messages.ts-dmt-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-dmt-user-profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.ts-dmt-user-profile-table th,
.ts-dmt-user-profile-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: top;
}

.ts-dmt-user-profile-table th {
    width: 120px;
    font-weight: 600;
}

.ts-dmt-user-profile-groups-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.ts-dmt-user-profile-groups-table th,
.ts-dmt-user-profile-groups-table td {
    padding: 0.5em 0.7em;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
    vertical-align: top;
}

.ts-dmt-user-profile-groups-table thead th {
    background: #f1f1f1;
    font-weight: 600;
}

.ts-dmt-user-profile-no-groups {
    color: #666;
    font-style: italic;
}

.ts-dmt-user-profile-contact-note {
    margin: 1em 0;
    font-style: italic;
    color: #555;
}

.ts-dmt-user-profile-field {
    margin-bottom: 1em;
}

.ts-dmt-user-profile-privacy-note {
    margin-top: 0.5em;
    font-size: 0.875em;
    font-style: italic;
    color: #555;
}
