.tmjr-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.tmjr-progress-wrap {
    margin: 20px 0 25px;
}

.tmjr-progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tmjr-progress-step {
    background: #f2f2f2;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.2;
}

.tmjr-progress-step.is-active {
    background: #086dff;
    color: #fff;
    border-color: #086dff;
}

.tmjr-progress-step.is-complete {
    background: #e8f7e8;
    border-color: #7dbf7d;
}

.tmjr-step {
    display: none;
}

.tmjr-step.is-active {
    display: block;
}

.tmjr-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-bottom: 22px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.tmjr-card h3 {
    margin-top: 0;
}

.tmjr-form input[type="text"],
.tmjr-form input[type="email"],
.tmjr-form input[type="date"],
.tmjr-form input[type="time"],
.tmjr-form select,
.tmjr-form textarea,
.tmjr-filter-grid input[type="text"],
.tmjr-filter-grid select,
.tmjr-dashboard-filter select {
    width: 100%;
    max-width: 100%;
    padding: 11px 12px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
}

.tmjr-form input[type="text"]:focus,
.tmjr-form input[type="email"]:focus,
.tmjr-form input[type="date"]:focus,
.tmjr-form input[type="time"]:focus,
.tmjr-form select:focus,
.tmjr-form textarea:focus,
.tmjr-filter-grid input[type="text"]:focus,
.tmjr-filter-grid select:focus,
.tmjr-dashboard-filter select:focus {
    outline: none;
    border-color: #1f6fff;
    box-shadow: 0 0 0 3px rgba(31, 111, 255, 0.12);
}

.tmjr-wizard-nav,
.tmjr-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tmjr-final-actions {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tmjr-final-actions.is-visible {
    display: flex;
}

.tmjr-btn,
.tmjr-actions button,
.tmjr-wizard-nav button {
    padding: 12px 18px;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 10px;
    font-weight: 500;
}

.tmjr-btn:hover,
.tmjr-actions button:hover,
.tmjr-wizard-nav button:hover {
    transform: translateY(-1px);
}

.tmjr-btn-primary {
    background: #086dff;
    color: #fff;
    border-color: #086dff;
}

.tmjr-btn-secondary {
    background: #f7f7f7;
}

.tmjr-alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.tmjr-alert-success {
    background: #e8f7e8;
    border: 1px solid #7dbf7d;
}

.tmjr-alert-error {
    background: #fdeaea;
    border: 1px solid #d27d7d;
}

.tmjr-help {
    font-style: italic;
    color: #666;
}

.tmjr-review-list {
    margin: 0;
    padding-left: 20px;
}

.tmjr-table-wrap {
    overflow-x: auto;
}

.tmjr-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.tmjr-table th,
.tmjr-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #edf1f5;
    border-right: none;
    border-left: none;
}

.tmjr-table th {
    background: #f8fafc;
    color: #475467;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.tmjr-table tr:last-child td {
    border-bottom: none;
}

.tmjr-table tbody tr:hover {
    background: #fafcff;
}

.tmjr-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid #d9d9d9;
    background: #f2f2f2;
}

.tmjr-badge-neutral {
    background: #f5f5f5;
}

.tmjr-badge-planning {
    background: #eef5ff;
    border-color: #b8d3ff;
}

.tmjr-link-button {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #086dff;
    color: #fff;
    text-decoration: none;
}

.tmjr-link-button:hover {
    color: #fff;
    opacity: 0.92;
}

.tmjr-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tmjr-detail-stack p {
    margin-bottom: 16px;
}

.tmjr-file-list,
.tmjr-activity-list {
    padding-left: 20px;
}

.tmjr-muted {
    color: #666;
}

.tmjr-action-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tmjr-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #086dff;
    color: #fff;
    text-decoration: none;
}

.tmjr-icon-button:hover {
    color: #fff;
    opacity: 0.92;
}

.tmjr-icon-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tmjr-filter-form {
    margin-bottom: 0;
}

.tmjr-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.tmjr-filter-grid input[type="text"],
.tmjr-filter-grid select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.tmjr-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tmjr-filter-actions .tmjr-btn {
    text-decoration: none;
}

.tmjr-job-lines-footer {
    margin-top: 16px;
}

.tmjr-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tmjr-nav-link {
    display: inline-block;
    padding: 10px 14px;
    background: #f3f6fb;
    border: 1px solid #d9e2f0;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2937;
}

.tmjr-nav-link:hover {
    text-decoration: none;
    background: #e8f0ff;
}

.tmjr-nav-link.is-active {
    background: #1f6fff;
    color: #ffffff;
    border-color: #1f6fff;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(31, 111, 255, 0.18);
}

.tmjr-nav-link.is-active:hover {
    background: #1f6fff;
    color: #ffffff;
}

.tmjr-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.tmjr-dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.tmjr-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tmjr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.tmjr-dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 20px;
}

.tmjr-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 18px 18px 16px;
    position: relative;
    overflow: hidden;
}

.tmjr-stat-card::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1f6fff 0%, #7aa7ff 100%);
}

.tmjr-stat-card.tmjr-stat-alert::before {
    background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
}

.tmjr-stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
    color: #1d3557;
}

.tmjr-stat-label {
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.tmjr-stat-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tmjr-dashboard-card:hover,
.tmjr-stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.tmjr-dashboard-card,
.tmjr-stat-card,
.tmjr-stat-link {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tmjr-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tmjr-dashboard-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tmjr-dashboard-filter select {
    min-width: 180px;
}

.tmjr-existing-files {
    margin-bottom: 16px;
}

.tmjr-file-list {
    margin: 0;
    padding-left: 18px;
}

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

.tmjr-file-delete-link {
    color: #b42318;
    text-decoration: none;
    font-size: 13px;
}

.tmjr-file-delete-link:hover {
    text-decoration: underline;
}

.tmjr-hidden {
    display: none;
}

.tmjr-dashboard-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #eef4ff;
    color: #1d3557;
}

.tmjr-dashboard-card-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.tmjr-dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.tmjr-dashboard-card p {
    margin: 0;
}

.tmjr-favourite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
    color: #c5c9d1;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.tmjr-favourite-toggle:hover {
    color: #e0a800;
    background: #fff8db;
    border-color: #f3d36a;
    text-decoration: none;
}

.tmjr-favourite-toggle.is-active {
    color: #e0a800;
    background: #fff8db;
    border-color: #f3d36a;
}

.tmjr-favourite-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tmjr-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.tmjr-pagination-pages {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tmjr-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #d9e2f0;
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
}

.tmjr-pagination-link:hover {
    background: #e8f0ff;
    text-decoration: none;
}

.tmjr-pagination-link.is-active {
    background: #1f6fff;
    color: #fff;
    border-color: #1f6fff;
}

.tmjr-favourite-loading {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tmjr-favourite-loading.is-visible {
    display: flex;
}

.tmjr-favourite-loading-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    font-weight: 600;
    color: #1f2937;
}

.tmjr-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.tmjr-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
}

.tmjr-field-group {
    margin-bottom: 18px;
}

.tmjr-btn-danger {
    background: #b42318;
    color: #fff;
    border-color: #b42318;
}

.tmjr-btn-danger:hover {
    color: #fff;
    opacity: 0.92;
}

.tmjr-planner-description-card {
    border-left: 4px solid #1f6fff;
}

.tmjr-planner-description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.tmjr-planner-description-item,
.tmjr-planner-description-block {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.tmjr-planner-description-block {
    margin-top: 14px;
}

.tmjr-planner-description-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
    margin-bottom: 8px;
}

.tmjr-planner-description-value {
    color: #1f2937;
    line-height: 1.55;
    white-space: normal;
}

.tmjr-accent-card {
    border-left: 4px solid #1f6fff;
}

.tmjr-highlight-block {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.tmjr-highlight-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
    margin-bottom: 10px;
}

.tmjr-highlight-value {
    font-size: 22px;
    line-height: 1.5;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.tmjr-inline-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tmjr-inline-info-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.tmjr-inline-info-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
    margin-bottom: 8px;
}

.tmjr-inline-info-value {
    color: #1f2937;
    line-height: 1.5;
}

.tmjr-site-data-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tmjr-site-data-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.tmjr-site-data-row-full {
    grid-template-columns: 1fr;
}

.tmjr-site-data-cell {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.tmjr-site-data-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
    margin-bottom: 8px;
}

.tmjr-site-data-value {
    color: #1f2937;
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 860px) {
    .tmjr-site-data-row {
        grid-template-columns: 1fr;
    }
}

.tmjr-site-data-cell-group-heading {
    background: #eef4ff;
    border-color: #cfe0ff;
}

.tmjr-site-data-cell-group-heading .tmjr-site-data-label {
    color: #1d4ed8;
    margin-bottom: 0;
}

.tmjr-job-lines-table thead th {
    background: #eef4ff;
    color: #1d4ed8;
    border-bottom: 1px solid #cfe0ff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 13px;
}

.tmjr-job-lines-table .tmjr-job-line-main td {
    background: #ffffff;
}

.tmjr-job-lines-table .tmjr-job-line-detail td {
    background: #f8fafc;
    border-top: none;
    padding: 18px 16px;
}

.tmjr-job-line-detail-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.tmjr-job-line-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.tmjr-job-line-detail-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
    margin-bottom: 8px;
}

.tmjr-job-line-detail-value {
    color: #1f2937;
    line-height: 1.55;
}

.tmjr-job-line-flags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.tmjr-job-line-flag-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
}

.tmjr-job-line-flag-label {
    font-size: 13px;
    font-weight: 700;
    color: #475467;
    margin-bottom: 6px;
}

.tmjr-job-line-flag-value {
    color: #1f2937;
    line-height: 1.5;
}

.tmjr-planner-update-form {
	margin: 0;
}

.tmjr-planner-field {
	width: 100%;
	max-width: 100%;
	padding: 11px 12px;
	box-sizing: border-box;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	font: inherit;
	color: #1f2937;
}

.tmjr-planner-field:focus {
	outline: none;
	border-color: #1f6fff;
	box-shadow: 0 0 0 3px rgba(31, 111, 255, 0.12);
}

.tmjr-planner-textarea {
	min-height: 160px;
	resize: vertical;
}

.tmjr-planner-actions {
	margin-top: 18px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tmjr-page-actions-icons {
    align-items: center;
}

.tmjr-page-actions .tmjr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
    line-height: 1.2;
    text-decoration: none;
    color: #1f6fff;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 18px;
    box-shadow: none;
}

.tmjr-page-actions .tmjr-btn:hover {
    text-decoration: none;
}

.tmjr-page-actions button.tmjr-btn {
    appearance: none;
    -webkit-appearance: none;
}

.tmjr-page-actions .tmjr-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    color: currentColor;
}

.tmjr-page-actions .tmjr-btn-danger {
    color: #fff;
    background: #b42318;
    border-color: #b42318;
}

.tmjr-page-actions .tmjr-btn-danger:hover {
    color: #fff;
}

.tmjr-page-actions .tmjr-btn:hover {
    background: #e8f0ff;
    border-color: #d9e2f0;
    color: #1f6fff;
    text-decoration: none;
}

.tmjr-page-actions .tmjr-btn-danger:hover {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
    text-decoration: none;
}

.tmjr-site-data-value input.tmjr-planner-field,
.tmjr-site-data-value select.tmjr-planner-field,
.tmjr-site-data-value textarea.tmjr-planner-field {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    padding: 11px 12px !important;
    box-sizing: border-box;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    background: #fff !important;
    font: inherit;
    color: #1f2937;
    box-shadow: none;
}

.tmjr-files-actions {
	margin-bottom: 16px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tmjr-file-download-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.tmjr-file-download-item {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 8px 0;
	border-bottom: 1px solid #edf1f5;
}

.tmjr-file-download-item:last-child {
	border-bottom: none;
}

.tmjr-file-download-icon {
	color: #1f6fff;
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
}

.tmjr-file-download-item a {
	text-decoration: none;
}

.tmjr-file-download-item a:hover {
	text-decoration: underline;
}

.tmjr-file-download-meta {
	color: #667085;
	font-size: 14px;
}

.tmjr-dashboard-card {
    position: relative;
    overflow: hidden;
}

/* cards that have an image on the right */
.tmjr-dashboard-card--image {
    padding-right: 220px;
}

/* keep card content above the image */
.tmjr-dashboard-card--image > * {
    position: relative;
    z-index: 2;
}

/* right-side image */
.tmjr-dashboard-card--image::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 34%;
    height: 100%;
    background-image: var(--tmjr-card-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%);
    opacity: 0.40;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 1;
    pointer-events: none;
}

/* fade from main white card into image area */
.tmjr-dashboard-card--image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,1) 58%,
        rgba(255,255,255,0.96) 70%,
        rgba(255,255,255,0.78) 82%,
        rgba(255,255,255,0.35) 92%,
        rgba(255,255,255,0) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* slightly stronger on hover */
.tmjr-dashboard-card--image:hover::after {
    opacity: 0.48;
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .tmjr-dashboard-card--image {
        padding-right: 28px;
    }

    .tmjr-dashboard-card--image::before,
    .tmjr-dashboard-card--image::after {
        display: none;
    }
}

.tmjr-date-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.tmjr-date-time-row > p {
    margin: 0;
}

@media (max-width: 782px) {
    .tmjr-date-time-row {
        grid-template-columns: 1fr;
    }
}

.tmjr-reports-wrap {
    max-width: 1320px;
}

.tmjr-reports-header {
    margin-bottom: 20px;
}

.tmjr-reports-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tmjr-reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tmjr-reports-grid-span-2 {
    grid-column: 1 / -1;
}

.tmjr-reports-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tmjr-report-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tmjr-report-bar-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tmjr-report-bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tmjr-report-bar-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

.tmjr-report-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1f6fff 0%, #7aa7ff 100%);
}

.tmjr-hour-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 6px;
    align-items: end;
    width: 100%;
    min-width: 0;
}

.tmjr-hour-chart-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tmjr-hour-chart-value {
    font-size: 12px;
    line-height: 1;
    color: #667085;
    text-align: center;
}

.tmjr-hour-chart-track {
    width: 100%;
    height: 160px;
    background: #f5f7fb;
    border-radius: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}

.tmjr-hour-chart-bar {
    display: block;
    width: 100%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #7aa7ff 0%, #1f6fff 100%);
}

.tmjr-hour-chart-label {
    font-size: 11px;
    line-height: 1;
    color: #667085;
    text-align: center;
}

.tmjr-card,
.tmjr-dashboard-card {
    overflow: hidden;
}

.tmjr-reports-matrix-table th,
.tmjr-reports-matrix-table td {
    text-align: center;
    white-space: nowrap;
}

.tmjr-reports-matrix-table th:first-child,
.tmjr-reports-matrix-table td:first-child {
    text-align: left;
    min-width: 180px;
}

.tmjr-reports-matrix-total-row td {
    background: #eef4ff;
}

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

    .tmjr-reports-grid-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .tmjr-hour-chart {
        gap: 3px;
    }

    .tmjr-hour-chart-track {
        height: 120px;
    }

    .tmjr-hour-chart-value,
    .tmjr-hour-chart-label {
        font-size: 10px;
    }
}

.tmjr-submit-loading {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.tmjr-submit-loading.is-visible {
    display: flex;
}

.tmjr-submit-loading-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tmjr-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #dbe7ff;
    border-top-color: #1f6fff;
    border-radius: 50%;
    animation: tmjr-spin 0.8s linear infinite;
    flex: 0 0 20px;
}

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

.tmjr-icon-button-cancel {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.tmjr-icon-button-cancel:hover {
    background: #fee4e2;
    color: #912018;
    opacity: 1;
}

.tmjr-action-icons {
    flex-wrap: nowrap;
}

.tmjr-wrap {
    max-width: 1220px;
}

.tmjr-empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tmjr-empty-state-image {
    display: block;
    max-width: 520px;
    width: 100%;
    height: auto;
    margin: 0 auto 18px;
    opacity: 0.95;
}

.tmjr-empty-state-text {
    margin: 0;
    color: #667085;
    font-size: 16px;
}

/* Hatton Assist application shell */
.tmjr-wrap:has(> .tmjr-module-sidebar) {
    max-width: 1440px;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) {
    grid-column: 2;
}

.tmjr-module-sidebar {
    grid-column: 1;
    grid-row: 1 / span 50;
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
    background: #0f172a;
    color: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.tmjr-module-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tmjr-module-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #1f6fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.tmjr-module-brand-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.tmjr-module-brand-subtitle,
.tmjr-module-eyebrow {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tmjr-module-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tmjr-module-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #dbeafe;
    text-decoration: none;
    border: 1px solid transparent;
}

.tmjr-module-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.tmjr-module-link.is-active {
    background: #1f6fff;
    color: #fff;
    box-shadow: 0 12px 26px rgba(31, 111, 255, 0.28);
}

.tmjr-module-link.is-disabled {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    cursor: not-allowed;
}

.tmjr-module-link small {
    margin-left: auto;
    font-size: 11px;
    color: #cbd5e1;
}

.tmjr-operations-nav-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 22px;
}

.tmjr-operations-nav-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tmjr-operations-nav-header h2 {
    margin: 2px 0 0;
}

.tmjr-operations-nav-header p {
    margin: 0;
    max-width: 520px;
    color: #667085;
}

.tmjr-stage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.tmjr-stage-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.tmjr-stage-not-requested {
    background: #f2f4f7;
    color: #475467;
    border-color: #d0d5dd;
}

.tmjr-stage-pending {
    background: #fffaeb;
    color: #b54708;
    border-color: #fedf89;
}

.tmjr-stage-completed {
    background: #ecfdf3;
    color: #027a48;
    border-color: #abefc6;
}

.tmjr-stage-rejected {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}

.tmjr-stage-more-info {
    background: #eff8ff;
    color: #175cd3;
    border-color: #b2ddff;
}

.tmjr-dashboard-card-disabled {
    opacity: 0.82;
    background: #f8fafc;
}

@media (max-width: 980px) {
    .tmjr-wrap:has(> .tmjr-module-sidebar) {
        display: block;
    }

    .tmjr-module-sidebar {
        position: static;
        min-height: auto;
        margin-bottom: 18px;
    }

    .tmjr-module-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tmjr-operations-nav-header {
        display: block;
    }

    .tmjr-operations-nav-header p {
        margin-top: 8px;
    }
}


/* Hatton Assist Phase 1B: full-width shell and future settings/accessibility foundations */
.tmjr-wrap:has(> .tmjr-module-sidebar) {
    max-width: none !important;
    width: calc(100vw - 32px);
    margin-left: calc(50% - 50vw + 16px);
    margin-right: calc(50% - 50vw + 16px);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    box-sizing: border-box;
}

.tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) {
    grid-column: 2;
    min-width: 0;
}

.tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.tmjr-module-sidebar {
    grid-column: 1;
    grid-row: 1 / span 80;
    position: sticky;
    top: 24px;
    min-height: calc(100vh - 48px);
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
}

.tmjr-module-sidebar-note {
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.45;
}

.tmjr-module-sidebar-note strong {
    display: block;
    color: #ffffff;
    margin-bottom: 5px;
}

.tmjr-module-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tmjr-module-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #1f6fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 22px rgba(31, 111, 255, 0.28);
}

.tmjr-module-brand-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.tmjr-module-brand-subtitle,
.tmjr-module-eyebrow {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tmjr-module-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tmjr-module-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #dbeafe;
    text-decoration: none;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.tmjr-module-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.tmjr-module-link.is-active {
    background: #1f6fff;
    color: #fff;
    box-shadow: 0 12px 26px rgba(31, 111, 255, 0.28);
}

.tmjr-module-link.is-disabled {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    cursor: not-allowed;
}

.tmjr-module-link small {
    margin-left: auto;
    font-size: 11px;
    color: #cbd5e1;
}

.tmjr-operations-nav-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 22px;
}

.tmjr-operations-nav-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tmjr-operations-nav-header h2 {
    margin: 2px 0 0;
}

.tmjr-operations-nav-header p {
    margin: 0;
    max-width: 620px;
    color: #667085;
}

.tmjr-dashboard-header h2 {
    margin-bottom: 4px;
}

.tmjr-dashboard-subtitle {
    margin: 0;
    color: #667085;
}

.tmjr-operations-search-card {
    margin-bottom: 18px;
}

.tmjr-stage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.tmjr-stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tmjr-stage-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 9px;
}

.tmjr-stage-not-requested {
    background: #f2f4f7;
    color: #475467;
    border-color: #d0d5dd;
}

.tmjr-stage-pending {
    background: #fffaeb;
    color: #b54708;
    border-color: #fedf89;
}

.tmjr-stage-completed {
    background: #ecfdf3;
    color: #027a48;
    border-color: #abefc6;
}

.tmjr-stage-rejected {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}

.tmjr-stage-more-info {
    background: #eff8ff;
    color: #175cd3;
    border-color: #b2ddff;
}

.tmjr-dashboard-card-disabled {
    opacity: 0.9;
    background: #f8fafc;
    border-style: dashed;
}

@media (min-width: 1500px) {
    .tmjr-wrap:has(> .tmjr-module-sidebar) {
        width: calc(100vw - 56px);
        margin-left: calc(50% - 50vw + 28px);
        margin-right: calc(50% - 50vw + 28px);
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    .tmjr-wrap:has(> .tmjr-module-sidebar) {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .tmjr-module-sidebar {
        position: static;
        min-height: auto;
        margin-bottom: 18px;
    }

    .tmjr-module-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tmjr-module-link {
        flex: 1 1 190px;
    }

    .tmjr-operations-nav-header {
        display: block;
    }

    .tmjr-operations-nav-header p {
        margin-top: 8px;
    }
}


.tmjr-field-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.tmjr-field-grid-2 > p {
    margin: 0 0 14px;
}

.tmjr-checkbox-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 16px;
}

@media (max-width: 782px) {
    .tmjr-field-grid-2 {
        grid-template-columns: 1fr;
    }
}


.tmjr-stage-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.tmjr-stage-summary-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.ha-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.ha-status-badge::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
}

.ha-status-not-requested {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

.ha-status-pending,
.ha-status-locked {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.ha-status-completed,
.ha-status-booked {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.ha-status-rejected {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ha-status-more-info-required,
.ha-status-more-info-needed {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

/* Phase 2D: compact operations workspace */
.tmjr-dashboard-header {
    margin-bottom: 12px;
}

.tmjr-dashboard-header h2 {
    margin-bottom: 4px;
}

.tmjr-dashboard-subtitle {
    margin: 0;
}

.tmjr-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.tmjr-stat-card {
    padding: 14px 14px 12px;
}

.tmjr-stat-number {
    font-size: 26px;
    margin-bottom: 6px;
}

.tmjr-stat-label {
    font-size: 13px;
}

.tmjr-operations-search-card-compact {
    padding: 16px;
    margin-bottom: 12px;
}

.tmjr-operations-toolbar,
.tmjr-operations-filter-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tmjr-operations-toolbar {
    margin-bottom: 12px;
}

.tmjr-operations-toolbar h3 {
    margin: 0 0 4px;
}

.tmjr-operations-toolbar p {
    margin: 0;
}

.tmjr-operations-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px 12px;
    margin-bottom: 12px;
}

.tmjr-operations-filter-grid label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
}

.tmjr-operations-filter-grid input,
.tmjr-operations-filter-grid select {
    min-height: 40px;
}

.tmjr-stage-legend-inline {
    margin: 0;
}

.tmjr-card > .tmjr-reports-card-header {
    margin-bottom: 10px;
}

.tmjr-card > .tmjr-reports-card-header h3 {
    margin-bottom: 4px;
}

.tmjr-card > .tmjr-reports-card-header p {
    margin: 0;
}

@media (max-width: 1400px) {
    .tmjr-operations-filter-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 860px) {
    .tmjr-operations-filter-grid {
        grid-template-columns: 1fr;
    }

    .tmjr-operations-toolbar,
    .tmjr-operations-filter-footer {
        align-items: stretch;
    }
}

/* Phase 2E: role-aware landing dashboard and fixed-height workspace */
.tmjr-wrap:has(> .tmjr-module-sidebar) {
    min-height: calc(100vh - 32px);
    align-items: stretch;
}

.tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-operations-nav-wrap {
    margin-bottom: 12px;
}

.tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-module-sidebar {
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
    min-height: 0;
    overflow: hidden;
}

.tmjr-ha-dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.tmjr-ha-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.tmjr-ha-dashboard-header h2 {
    margin: 0 0 3px;
    font-size: 22px;
    line-height: 1.2;
}

.tmjr-ha-dashboard-header .tmjr-module-eyebrow {
    margin: 0 0 3px;
}

.tmjr-ha-dashboard-card .tmjr-dashboard-subtitle {
    margin: 0;
    font-size: 13px;
}

.tmjr-ha-dashboard-card .tmjr-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    margin-bottom: 0;
}

.tmjr-ha-dashboard-card .tmjr-stat-card {
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: none;
}

.tmjr-ha-dashboard-card .tmjr-stat-card::before {
    height: 3px;
}

.tmjr-ha-dashboard-card .tmjr-stat-number {
    font-size: 24px;
    margin-bottom: 4px;
}

.tmjr-ha-dashboard-card .tmjr-stat-label {
    font-size: 12px;
    line-height: 1.35;
}

.tmjr-operations-search-card-compact {
    margin-bottom: 10px;
}

.tmjr-operations-search-card-compact .tmjr-operations-toolbar {
    margin-bottom: 8px;
}

.tmjr-operations-search-card-compact h3 {
    font-size: 17px;
}

.tmjr-operations-search-card-compact .tmjr-muted {
    font-size: 13px;
}

.tmjr-operations-filter-grid {
    gap: 8px 10px;
    margin-bottom: 10px;
}

.tmjr-operations-filter-grid label {
    font-size: 11px;
}

.tmjr-operations-filter-grid input,
.tmjr-operations-filter-grid select {
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tmjr-stage-legend-inline .tmjr-stage-pill {
    padding: 4px 8px;
    font-size: 11px;
}

.tmjr-operations-results-card {
    margin-bottom: 0;
    padding: 16px;
}

.tmjr-operations-results-card .tmjr-reports-card-header {
    margin-bottom: 8px;
}

.tmjr-operations-results-card .tmjr-reports-card-header h3 {
    font-size: 17px;
}

.tmjr-operations-results-card .tmjr-muted {
    font-size: 13px;
}

.tmjr-operations-results-card .tmjr-table th,
.tmjr-operations-results-card .tmjr-table td {
    padding: 9px 10px;
}

.tmjr-operations-results-card .tmjr-table-wrap {
    max-height: calc(100vh - 555px);
    overflow: auto;
}

.tmjr-operations-results-card .tmjr-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

@media (max-height: 850px) and (min-width: 981px) {
    .tmjr-operations-results-card .tmjr-table-wrap {
        max-height: calc(100vh - 500px);
    }

    .tmjr-ha-dashboard-card .tmjr-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .tmjr-ha-dashboard-card .tmjr-stat-number {
        font-size: 22px;
    }
}

@media (max-width: 980px) {
    .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-module-sidebar {
        height: auto;
        overflow: visible;
    }

    .tmjr-ha-dashboard-header {
        display: block;
    }

    .tmjr-ha-dashboard-header .tmjr-dashboard-filter {
        margin-top: 10px;
    }

    .tmjr-operations-results-card .tmjr-table-wrap {
        max-height: none;
    }
}

/* Phase 3A - CAD Queue */
.tmjr-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tmjr-card-header-row h2,
.tmjr-card-header-row h3 {
    margin: 0 0 6px;
}

.tmjr-compact-card {
    padding: 16px;
    margin-bottom: 16px;
}

.tmjr-filter-grid-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.tmjr-filter-grid-compact label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475467;
}

.tmjr-filter-grid-compact input,
.tmjr-filter-grid-compact select {
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tmjr-filter-actions-right {
    justify-content: flex-end;
    margin-top: 12px;
}

.tmjr-table-wrap-compact {
    max-height: calc(100vh - 430px);
    overflow: auto;
}

.tmjr-table-wrap-compact .tmjr-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.tmjr-empty-state-small {
    min-height: 120px;
}

@media (max-width: 1280px) {
    .tmjr-filter-grid-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .tmjr-card-header-row {
        display: block;
    }

    .tmjr-filter-grid-compact {
        grid-template-columns: 1fr;
    }

    .tmjr-filter-actions-right {
        justify-content: flex-start;
    }
}


/* Hatton Assist secure login */
.ha-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at top left, rgba(31, 111, 255, 0.18), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
}

.ha-login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    padding: 28px;
}

.ha-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.ha-login-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1f6fff;
    color: #ffffff;
}

.ha-login-mark .dashicons {
    font-size: 25px;
    width: 25px;
    height: 25px;
}

.ha-login-brand h1 {
    margin: 0 0 4px;
    font-size: 28px;
    line-height: 1.1;
    color: #111827;
}

.ha-login-brand p {
    margin: 0;
    color: #667085;
}

.ha-login-form p {
    margin: 0 0 16px;
}

.ha-login-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #344054;
}

.ha-login-form input[type="text"],
.ha-login-form input[type="password"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 13px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
}

.ha-login-form input[type="text"]:focus,
.ha-login-form input[type="password"]:focus {
    outline: none;
    border-color: #1f6fff;
    box-shadow: 0 0 0 3px rgba(31, 111, 255, 0.12);
}

.ha-login-remember {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 2px 0 20px;
    font-weight: 500 !important;
}

.ha-login-remember input {
    margin: 0;
}

.ha-login-button {
    width: 100%;
    justify-content: center;
}

.ha-login-footer {
    margin-top: 18px;
    text-align: center;
}

.ha-login-footer a {
    color: #1f6fff;
    text-decoration: none;
}

.ha-login-footer a:hover {
    text-decoration: underline;
}

/* Phase 3D - app shell polish, fixed sidebar, consistent search controls */
html,
body.hatton-assist-body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.hatton-assist-body #hatton-assist-root {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) {
    width: 100vw !important;
    max-width: none !important;
    height: 100vh;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 18px 18px 0;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    background: #f5f7fb;
    scrollbar-gutter: stable;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) {
    grid-column: 2;
    min-width: 0;
}

body.hatton-assist-body .tmjr-module-sidebar {
    grid-column: 1;
    grid-row: 1 / span 100;
    position: sticky !important;
    top: 0 !important;
    align-self: start;
    height: 100vh !important;
    min-height: 100vh !important;
    width: 292px;
    overflow: hidden;
    border-radius: 0 18px 18px 0;
    margin: 0;
    padding: 22px 18px;
}

body.hatton-assist-body .tmjr-operations-nav-wrap {
    margin-top: 8px;
}

.tmjr-module-link svg,
.tmjr-module-svg-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tmjr-module-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.tmjr-module-link.is-disabled svg,
.tmjr-module-link.is-disabled .tmjr-module-svg-icon {
    opacity: 0.85;
}

.tmjr-operations-search-card-compact {
    padding: 18px;
}

.tmjr-operations-filter-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    align-items: end;
    gap: 12px 14px;
}

.tmjr-operations-filter-grid > div,
.tmjr-filter-grid-compact > div {
    min-width: 0;
}

.tmjr-operations-filter-grid label,
.tmjr-filter-grid-compact label {
    min-height: 16px;
    line-height: 1.2;
    margin-bottom: 6px;
}

.tmjr-operations-filter-grid input[type="text"],
.tmjr-operations-filter-grid input[type="search"],
.tmjr-operations-filter-grid input[type="date"],
.tmjr-operations-filter-grid select,
.tmjr-filter-grid-compact input[type="text"],
.tmjr-filter-grid-compact input[type="search"],
.tmjr-filter-grid-compact input[type="date"],
.tmjr-filter-grid-compact select {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 42px;
    min-height: 42px;
    padding: 10px 12px !important;
    box-sizing: border-box;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #1f2937;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: none;
    appearance: auto;
}

.tmjr-operations-filter-grid input:focus,
.tmjr-operations-filter-grid select:focus,
.tmjr-filter-grid-compact input:focus,
.tmjr-filter-grid-compact select:focus {
    outline: none;
    border-color: #1f6fff !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 255, 0.12);
}

.tmjr-operations-filter-footer {
    align-items: center;
    margin-top: 2px;
}

.tmjr-operations-filter-footer .tmjr-filter-actions {
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.tmjr-operations-filter-footer .tmjr-btn,
.tmjr-filter-actions-right .tmjr-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tmjr-stage-legend-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.tmjr-operations-results-card {
    min-height: 220px;
}

.tmjr-empty-state {
    min-height: 260px;
}

@media (min-width: 1500px) {
    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) {
        width: 100vw !important;
        margin: 0 !important;
        grid-template-columns: 292px minmax(0, 1fr);
        padding-right: 18px;
    }
}

@media (max-width: 1200px) {
    .tmjr-operations-filter-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }
}

@media (max-width: 980px) {
    body.hatton-assist-body,
    body.hatton-assist-body #hatton-assist-root {
        height: auto;
        overflow: auto;
    }

    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) {
        display: block;
        width: 100% !important;
        height: auto;
        min-height: 100vh;
        padding: 12px;
        overflow: visible;
    }

    body.hatton-assist-body .tmjr-module-sidebar {
        position: relative !important;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 18px;
        margin-bottom: 14px;
        overflow: visible;
    }

    .tmjr-operations-filter-grid {
        grid-template-columns: 1fr;
    }

    .tmjr-operations-filter-footer .tmjr-filter-actions {
        justify-content: flex-start;
        margin-left: 0;
    }
}

/* Phase 3E - layout overlap, button colour and compact empty-state fixes */
body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) {
    align-content: start;
    padding-bottom: 14px;
}
body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) { position: relative; }
.tmjr-dashboard-card, .tmjr-card, .tmjr-ha-dashboard-card, .tmjr-operations-nav-wrap { position: relative; z-index: 1; }
.tmjr-operations-search-card { z-index: 3; overflow: visible; }
.tmjr-operations-results-card { z-index: 2; min-height: 0 !important; overflow: hidden; }
.tmjr-operations-results-card .tmjr-empty-state {
    min-height: 210px !important;
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    clear: both;
}
.tmjr-operations-results-card .tmjr-empty-state-image {
    max-width: 310px !important;
    width: min(310px, 36vw) !important;
    margin: 0 auto 4px !important;
    opacity: 0.9;
}
.tmjr-operations-results-card .tmjr-empty-state-text { margin: 0 !important; }
.tmjr-operations-filter-form { position: relative; z-index: 4; }
.tmjr-operations-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px 16px !important;
}
.tmjr-operations-filter-grid label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475467;
}
.tmjr-operations-filter-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}
.tmjr-operations-filter-footer .tmjr-filter-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tmjr-btn, .tmjr-actions button, .tmjr-wizard-nav button, a.tmjr-btn, button.tmjr-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    text-decoration: none !important;
    line-height: 1.2;
    box-sizing: border-box;
}
.tmjr-btn-primary, a.tmjr-btn-primary, button.tmjr-btn-primary, .tmjr-wizard-nav button.tmjr-btn-primary, .tmjr-final-actions button.tmjr-btn-primary {
    background: #1f6fff !important;
    color: #ffffff !important;
    border-color: #1f6fff !important;
    box-shadow: 0 10px 20px rgba(31, 111, 255, 0.18);
}
.tmjr-btn-primary:hover, a.tmjr-btn-primary:hover, button.tmjr-btn-primary:hover {
    background: #155eef !important;
    color: #ffffff !important;
    border-color: #155eef !important;
}
.tmjr-btn-secondary, a.tmjr-btn-secondary, button.tmjr-btn-secondary, .tmjr-wizard-nav button.tmjr-btn-secondary {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: #d1d5db !important;
}
#tmjr-next-step { min-width: 92px; }
.tmjr-wizard-nav { align-items: center; margin-bottom: 8px; }
.tmjr-form .tmjr-card:last-of-type { margin-bottom: 12px; }
@media (min-width: 1500px) { .tmjr-operations-results-card .tmjr-empty-state { min-height: 240px !important; } }
@media (max-width: 1200px) { .tmjr-operations-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 782px) { .tmjr-operations-filter-grid { grid-template-columns: 1fr !important; } }

/* Phase 3I: restore WordPress Dashicons after the minimal app theme font reset. */
.dashicons,
.dashicons-before::before {
    font-family: dashicons !important;
    font-style: normal !important;
    font-weight: 400 !important;
    speak: never;
    display: inline-block;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tmjr-icon-button .dashicons,
.tmjr-page-actions .tmjr-btn .dashicons,
.tmjr-file-download-icon,
.tmjr-favourite-toggle .dashicons {
    font-family: dashicons !important;
}


/* Phase 3K: app shell, routing UI and sidebar footer fixes */
body.hatton-assist-body,
body.hatton-assist-body #hatton-assist-root,
body.hatton-assist-body #hatton-assist-root > .tmjr-wrap {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap {
    display: grid !important;
    grid-template-columns: 292px minmax(0, 1fr) !important;
    grid-auto-rows: max-content !important;
    min-height: 100vh !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 20px 24px 0 !important;
    gap: 18px !important;
    background: #f5f7fb !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap > .tmjr-module-sidebar {
    grid-column: 1 !important;
    grid-row: 1 / span 999 !important;
    align-self: start !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 18px 18px 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap > *:not(.tmjr-module-sidebar) {
    grid-column: 2 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.tmjr-module-sidebar-footer {
    margin-top: auto;
    padding: 14px 12px 4px;
    border-top: 1px solid rgba(255,255,255,0.10);
    color: #9fb0c7;
    font-size: 11px;
    line-height: 1.45;
}

.tmjr-module-sidebar-footer div + div {
    margin-top: 4px;
}

.tmjr-favourite-loading,
.tmjr-submit-loading {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: rgba(15, 23, 42, 0.28) !important;
    align-items: center !important;
    justify-content: center !important;
}

.tmjr-favourite-loading.is-visible,
.tmjr-submit-loading.is-visible {
    display: flex !important;
}

.tmjr-favourite-loading-box,
.tmjr-submit-loading-box {
    min-width: 240px;
    justify-content: center;
}

.tmjr-icon-button .dashicons,
.tmjr-favourite-toggle .dashicons,
.tmjr-page-actions .tmjr-btn .dashicons {
    font-family: dashicons !important;
    font-weight: normal !important;
    font-style: normal !important;
    text-decoration: inherit !important;
    text-transform: none !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

@media (max-width: 980px) {
    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap {
        display: block !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        padding: 0 14px 18px !important;
    }

    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap > .tmjr-module-sidebar {
        position: relative !important;
        height: auto !important;
        border-radius: 0 0 18px 18px !important;
        margin: 0 0 16px 0 !important;
    }
}


/* Phase 3L: robust fixed sidebar/app shell override */
body.hatton-assist-body {
    overflow: hidden !important;
}

body.hatton-assist-body #hatton-assist-root {
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
    display: block !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 22px 24px 314px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #f5f7fb !important;
    box-sizing: border-box !important;
    scrollbar-gutter: stable;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    width: 292px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 18px 18px 0 !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-operations-nav-wrap,
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-card,
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-dashboard-card,
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-detail-grid,
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-table-wrap {
    max-width: none !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) .tmjr-table-wrap {
    overflow-x: auto !important;
}

.tmjr-favourite-loading,
.tmjr-submit-loading {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
}

@media (max-width: 980px) {
    body.hatton-assist-body {
        overflow: auto !important;
    }

    body.hatton-assist-body #hatton-assist-root {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
        height: auto !important;
        min-height: 100vh !important;
        padding: 0 14px 18px !important;
        overflow: visible !important;
    }

    body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 0 0 18px 18px !important;
        margin-bottom: 16px !important;
    }
}

/* Phase 3P: definitive scroll/empty-state cleanup.
   Previous shell passes left some grid-row/min-height rules in the cascade. These
   overrides keep the sidebar fixed and make the right workspace scroll only to
   actual content height. */
body.hatton-assist-body {
    overflow: hidden !important;
}

body.hatton-assist-body #hatton-assist-root {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
    display: block !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 22px 18px 314px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #f5f7fb !important;
    box-sizing: border-box !important;
    scroll-padding-bottom: 18px !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar,
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    width: 292px !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 18px 18px 0 !important;
    grid-row: auto !important;
    grid-column: auto !important;
}

body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar),
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > *:not(.tmjr-module-sidebar) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > *:last-child {
    margin-bottom: 0 !important;
}

.tmjr-card,
.tmjr-dashboard-card,
.tmjr-ha-dashboard-card,
.tmjr-operations-nav-wrap {
    margin-bottom: 14px !important;
}

.tmjr-operations-results-card,
.tmjr-card:has(.tmjr-empty-state) {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 16px !important;
    overflow: hidden !important;
}

.tmjr-empty-state,
.tmjr-operations-results-card .tmjr-empty-state,
.tmjr-empty-state-small {
    min-height: 0 !important;
    height: auto !important;
    padding: 18px 16px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.tmjr-empty-state-image,
.tmjr-operations-results-card .tmjr-empty-state-image,
.tmjr-empty-state-small .tmjr-empty-state-image {
    display: block !important;
    width: min(280px, 32vw) !important;
    max-width: 280px !important;
    height: auto !important;
    margin: 0 auto 4px !important;
    opacity: 0.92 !important;
}

.tmjr-empty-state-text {
    margin: 0 !important;
    text-align: center !important;
}

.tmjr-module-sidebar-footer {
    padding-bottom: 18px !important;
}

@media (max-width: 980px) {
    body.hatton-assist-body {
        overflow: auto !important;
    }

    body.hatton-assist-body #hatton-assist-root {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
    body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
        height: auto !important;
        min-height: 100vh !important;
        padding: 0 14px 18px !important;
        overflow: visible !important;
    }

    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar,
    body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-module-sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 0 0 18px 18px !important;
        margin-bottom: 16px !important;
    }

    .tmjr-empty-state-image,
    .tmjr-operations-results-card .tmjr-empty-state-image,
    .tmjr-empty-state-small .tmjr-empty-state-image {
        width: min(240px, 70vw) !important;
        max-width: 240px !important;
    }
}

/* Phase 4A - CAD staged file uploads */
.tmjr-file-input {
    padding: 9px 10px !important;
    background: #fff;
}

.tmjr-stage-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.tmjr-cad-stage-card .tmjr-help {
    margin: 8px 0 0;
    font-size: 13px;
}

/* Phase 4B - CAD dashboards and stage-specific detail panels */
.tmjr-cad-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 18px;
}

.tmjr-cad-dashboard-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 104px;
    padding: 16px 18px;
    border: 1px solid #d9e2f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tmjr-cad-dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
    text-decoration: none;
    background: #ffffff;
}

.tmjr-cad-dashboard-card.is-active {
    border-color: #1f6fff;
    background: #eef4ff;
    box-shadow: 0 10px 24px rgba(31, 111, 255, 0.14);
}

.tmjr-cad-dashboard-title {
    font-size: 15px;
    font-weight: 800;
    color: #102a43;
}

.tmjr-cad-dashboard-description {
    font-size: 13px;
    line-height: 1.45;
    color: #667085;
}

.tmjr-cad-details-card .tmjr-reports-card-header {
    margin-bottom: 8px;
}

.tmjr-cad-stage-detail-panel {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    margin-top: 16px;
}

.tmjr-cad-stage-detail-panel h4 {
    margin: 0 0 14px;
    color: #102a43;
    font-size: 16px;
}

.tmjr-cad-stage-detail-12d {
    border-left: 4px solid #1f6fff;
}

.tmjr-cad-stage-detail-12ab {
    border-left: 4px solid #7c3aed;
}

.tmjr-cad-stage-detail-rsr {
    border-left: 4px solid #059669;
}

.tmjr-cad-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tmjr-cad-detail-cell-wide {
    grid-column: span 3;
}

@media (max-width: 1200px) {
    .tmjr-cad-dashboard-grid,
    .tmjr-cad-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tmjr-cad-detail-cell-wide {
        grid-column: span 2;
    }
}

@media (max-width: 782px) {
    .tmjr-cad-dashboard-grid,
    .tmjr-cad-detail-grid {
        grid-template-columns: 1fr;
    }

    .tmjr-cad-detail-cell-wide {
        grid-column: span 1;
    }
}
/* Hatton Assist account menu */
.tmjr-operations-nav-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
    flex: 1 1 auto;
}

.tmjr-operations-nav-actions > p {
    margin: 0;
    max-width: 620px;
    color: #667085;
}

.tmjr-account-menu {
    position: relative;
    flex: 0 0 auto;
}

.tmjr-account-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid #d0d5dd;
    background: #f8fafc;
    color: #344054;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.tmjr-account-toggle:hover,
.tmjr-account-toggle:focus-visible,
.tmjr-account-menu.is-open .tmjr-account-toggle {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #175cd3;
    box-shadow: 0 12px 26px rgba(23, 92, 211, 0.16);
    outline: none;
}

.tmjr-account-toggle-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.tmjr-account-toggle-avatar .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.tmjr-account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(290px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    z-index: 50;
}

.tmjr-account-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #5b88b8 0%, #4b8fd1 100%);
    color: #ffffff;
}

.tmjr-account-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tmjr-account-dropdown-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.tmjr-account-dropdown-email {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.tmjr-account-dropdown-body {
    padding: 10px 0;
}

.tmjr-account-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.tmjr-account-dropdown-link:hover,
.tmjr-account-dropdown-link:focus-visible {
    background: #f8fafc;
    color: #175cd3;
    outline: none;
    text-decoration: none;
}

.tmjr-account-dropdown-meta-link small {
    color: #98a2b3;
    font-size: 12px;
    white-space: nowrap;
}

.tmjr-account-dropdown-divider {
    height: 1px;
    margin: 6px 0;
    background: #eaecf0;
}

.tmjr-account-dropdown-link-logout {
    font-weight: 600;
}

@media (max-width: 980px) {
    .tmjr-operations-nav-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 12px;
    }

    .tmjr-operations-nav-actions > p {
        max-width: none;
    }
}

@media (max-width: 680px) {
    .tmjr-operations-nav-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tmjr-account-menu {
        align-self: flex-end;
    }
}

/* Hatton Assist front-end profile */
.tmjr-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tmjr-profile-header h2 {
    margin: 2px 0 6px;
}

.tmjr-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.tmjr-profile-card h3,
.tmjr-profile-side-card h3 {
    margin-top: 0;
}

.tmjr-profile-fields p {
    margin: 0;
}

.tmjr-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tmjr-profile-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    margin-bottom: 18px;
}

.tmjr-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #1f6fff;
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 12px 26px rgba(31, 111, 255, 0.22);
}

.tmjr-profile-name {
    color: #102a43;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.tmjr-profile-role-list,
.tmjr-profile-security-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}

.tmjr-profile-security-box p {
    margin-top: 8px;
}

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

/* Phase 5C: account menu layering/clipping fix */
.tmjr-wrap:has(> .tmjr-module-sidebar) > .tmjr-operations-nav-wrap,
body.hatton-assist-body .tmjr-operations-nav-wrap,
.tmjr-operations-nav-wrap {
    overflow: visible !important;
    position: relative !important;
    z-index: 1000 !important;
}

.tmjr-operations-nav-header {
    position: relative !important;
    z-index: 1001 !important;
}

.tmjr-operations-nav-actions,
.tmjr-account-menu,
.tmjr-account-menu.is-open {
    position: relative !important;
    z-index: 1002 !important;
}

.tmjr-account-dropdown {
    z-index: 100000 !important;
}

.screen-reader-text,
.tmjr-account-toggle .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tmjr-ha-dashboard-card,
.tmjr-operations-search-card,
.tmjr-operations-results-card,
.tmjr-card,
.tmjr-dashboard-card {
    position: relative;
    z-index: 1;
}

/* Phase 6A: Requester CAD review / release to planner */
.tmjr-cad-review-card {
    border-left-color: #16a34a;
}

.tmjr-release-planner-form {
    margin-top: 18px;
}

.tmjr-cad-review-card .tmjr-highlight-value {
    font-size: 18px;
}

/* Phase 6C: planner-focused request detail */
.tmjr-view-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: -4px 0 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #175cd3;
    font-size: 13px;
    font-weight: 700;
}

.tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-rows {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-row {
    display: contents;
}

.tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-cell {
    min-width: 0;
}

.tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-value {
    overflow-wrap: anywhere;
}

@media (max-width: 1500px) {
    .tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-rows {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-rows {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .tmjr-planner-detail-view .tmjr-planner-compact-card .tmjr-site-data-rows {
        grid-template-columns: 1fr;
    }
}

/* Phase 6D: action icon button contrast */
.tmjr-icon-button,
.tmjr-action-icons .tmjr-icon-button,
.tmjr-page-actions .tmjr-icon-button {
    background: #086dff;
    border: 1px solid #086dff;
    color: #ffffff !important;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tmjr-icon-button .dashicons,
.tmjr-action-icons .tmjr-icon-button .dashicons,
.tmjr-page-actions .tmjr-icon-button .dashicons {
    color: #ffffff !important;
}

.tmjr-icon-button:hover,
.tmjr-action-icons .tmjr-icon-button:hover,
.tmjr-page-actions .tmjr-icon-button:hover {
    background: #0057d9;
    border-color: #0057d9;
    color: #ffffff !important;
    box-shadow: 0 10px 18px rgba(8, 109, 255, 0.22);
    transform: translateY(-1px);
    opacity: 1;
}

.tmjr-icon-button:focus-visible,
.tmjr-action-icons .tmjr-icon-button:focus-visible {
    outline: 3px solid rgba(8, 109, 255, 0.22);
    outline-offset: 2px;
}

.tmjr-icon-button-cancel,
.tmjr-action-icons .tmjr-icon-button-cancel {
    background: #fef3f2;
    color: #b42318 !important;
    border-color: #fecdca;
}

.tmjr-icon-button-cancel .dashicons,
.tmjr-action-icons .tmjr-icon-button-cancel .dashicons {
    color: #b42318 !important;
}

.tmjr-icon-button-cancel:hover,
.tmjr-action-icons .tmjr-icon-button-cancel:hover {
    background: #b42318;
    border-color: #b42318;
    color: #ffffff !important;
}

.tmjr-icon-button-cancel:hover .dashicons,
.tmjr-action-icons .tmjr-icon-button-cancel:hover .dashicons {
    color: #ffffff !important;
}

/* CAD supporting documents within individual CAD sections */
.tmjr-cad-supporting-documents {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #dbe7ff;
    border-radius: 14px;
    background: #f8fbff;
}

.tmjr-cad-supporting-documents h4 {
    margin: 0 0 8px;
    color: #0b2341;
    font-size: 16px;
}

.tmjr-cad-supporting-documents p:last-child {
    margin-bottom: 0;
}

/* Phase 7A: CAD drawing references and CAD completion attribution */
.tmjr-drawing-number-list {
    font-weight: 700;
    color: #0f2f57;
    line-height: 1.45;
    word-break: break-word;
}

.tmjr-site-data-cell-wide {
    grid-column: 1 / -1;
}

.tmjr-cad-status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
    gap: 14px;
    align-items: end;
}

.tmjr-readonly-field {
    display: flex;
    align-items: center;
    min-height: 42px;
    background: #f8fafc;
    color: #344054;
}

@media (max-width: 760px) {
    .tmjr-cad-status-row {
        grid-template-columns: 1fr;
    }
}


/* Phase 7D: draw requester attention to records waiting for requester review */
.ha-status-awaiting-requester-review {
    background: #fffbeb;
    border-color: #facc15;
    color: #854d0e;
    animation: tmjrAwaitingRequesterReviewPulse 2.8s ease-in-out infinite;
}

@keyframes tmjrAwaitingRequesterReviewPulse {
    0%, 100% {
        background: #fffbeb;
        border-color: #facc15;
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.26);
    }

    50% {
        background: #fef3c7;
        border-color: #eab308;
        box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ha-status-awaiting-requester-review {
        animation: none;
        box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
    }
}

/* Phase 7E: requester review lifecycle badge attention state */
.tmjr-badge.tmjr-badge-awaiting-requester-review,
.tmjr-badge.tmjr-badge-awaiting-review,
.ha-status-badge.ha-status-awaiting-requester-review,
.ha-status-badge.ha-status-awaiting-review {
    background: #fffaeb !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.42);
    animation: tmjrAwaitingRequesterReviewPulse 2.4s ease-in-out infinite;
}

@keyframes tmjrAwaitingRequesterReviewPulse {
    0%, 100% {
        background: #fffaeb;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.34);
    }
    50% {
        background: #fef3c7;
        box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.10);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tmjr-badge.tmjr-badge-awaiting-requester-review,
    .tmjr-badge.tmjr-badge-awaiting-review,
    .ha-status-badge.ha-status-awaiting-requester-review,
    .ha-status-badge.ha-status-awaiting-review {
        animation: none !important;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
    }
}


/* Phase 7F: attention pulse for active/blocked statuses */
.tmjr-badge.tmjr-badge-attention-pending,
.tmjr-badge.tmjr-badge-attention-locked,
.tmjr-badge.tmjr-badge-attention-more-info-required,
.ha-status-badge.ha-status-attention-pending,
.ha-status-badge.ha-status-attention-locked,
.ha-status-badge.ha-status-attention-more-info-required {
    will-change: box-shadow, background-color, border-color;
}

.tmjr-badge.tmjr-badge-attention-pending,
.ha-status-badge.ha-status-attention-pending {
    background: #fffaeb !important;
    color: #b54708 !important;
    border-color: #f79009 !important;
    animation: tmjrPendingPulse 2.8s ease-in-out infinite;
}

.tmjr-badge.tmjr-badge-attention-locked,
.ha-status-badge.ha-status-attention-locked {
    background: #fff7ed !important;
    color: #9a3412 !important;
    border-color: #fb923c !important;
    animation: tmjrLockedPulse 3s ease-in-out infinite;
}

.tmjr-badge.tmjr-badge-attention-more-info-required,
.ha-status-badge.ha-status-attention-more-info-required {
    background: #eff8ff !important;
    color: #175cd3 !important;
    border-color: #2e90fa !important;
    animation: tmjrMoreInfoPulse 2.8s ease-in-out infinite;
}

@keyframes tmjrPendingPulse {
    0%, 100% {
        background: #fffaeb;
        box-shadow: 0 0 0 0 rgba(247, 144, 9, 0.34);
    }
    50% {
        background: #fef0c7;
        box-shadow: 0 0 0 5px rgba(247, 144, 9, 0.10);
    }
}

@keyframes tmjrLockedPulse {
    0%, 100% {
        background: #fff7ed;
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.34);
    }
    50% {
        background: #fed7aa;
        box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.10);
    }
}

@keyframes tmjrMoreInfoPulse {
    0%, 100% {
        background: #eff8ff;
        box-shadow: 0 0 0 0 rgba(46, 144, 250, 0.32);
    }
    50% {
        background: #d1e9ff;
        box-shadow: 0 0 0 5px rgba(46, 144, 250, 0.10);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tmjr-badge.tmjr-badge-attention-pending,
    .ha-status-badge.ha-status-attention-pending {
        animation: none !important;
        box-shadow: 0 0 0 3px rgba(247, 144, 9, 0.16);
    }

    .tmjr-badge.tmjr-badge-attention-locked,
    .ha-status-badge.ha-status-attention-locked {
        animation: none !important;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
    }

    .tmjr-badge.tmjr-badge-attention-more-info-required,
    .ha-status-badge.ha-status-attention-more-info-required {
        animation: none !important;
        box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.16);
    }
}


/* Phase 7J: workspace breathing room and pagination-controlled panels */
body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
    padding-right: 34px !important;
    padding-bottom: 34px !important;
    scroll-padding-bottom: 34px !important;
}

body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) > *:last-child {
    margin-bottom: 24px !important;
}

.tmjr-module-sidebar-footer {
    padding-bottom: 26px !important;
}

/* Tables with a per-page selector should not create an internal vertical scroller.
   The per-page limit + pagination controls the table length instead. */
.tmjr-operations-results-card .tmjr-table-wrap,
.tmjr-table-wrap-compact,
.tmjr-card .tmjr-table-wrap {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: auto !important;
}

.tmjr-operations-results-card .tmjr-table thead th,
.tmjr-table-wrap-compact .tmjr-table thead th {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

@media (max-width: 980px) {
    body.hatton-assist-body #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
    body.hatton-assist-body .tmjr-wrap:has(> .tmjr-module-sidebar) {
        padding-right: 16px !important;
        padding-bottom: 24px !important;
    }
}

/* Phase 8A: auto-refresh panel status text */
.tmjr-auto-refresh-meta {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #98a2b3;
}

.tmjr-auto-refresh-card-heading {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 8px;
}

.tmjr-auto-refresh-card-heading .tmjr-auto-refresh-meta {
    margin: 0;
}

/* Phase 8B: request form button and status badge polish */
.tmjr-remove-line,
.tmjr-form .tmjr-remove-line,
button.tmjr-remove-line {
    background: #b42318 !important;
    border-color: #b42318 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(180, 35, 24, 0.14);
}

.tmjr-remove-line:hover,
.tmjr-form .tmjr-remove-line:hover,
button.tmjr-remove-line:hover {
    background: #912018 !important;
    border-color: #912018 !important;
    color: #ffffff !important;
}

.tmjr-badge.tmjr-badge-awaiting-requester-review,
.tmjr-badge.tmjr-badge-awaiting-review,
.ha-status-badge.ha-status-awaiting-requester-review,
.ha-status-badge.ha-status-awaiting-review {
    font-weight: 800 !important;
}


/* Phase 8C: status badge and Task Briefing Sheet polish */
.tmjr-badge,
.ha-status-badge,
.tmjr-stage-pill {
    white-space: nowrap !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.tmjr-badge.tmjr-badge-awaiting-requester-review,
.tmjr-badge.tmjr-badge-awaiting-review,
.ha-status-badge.ha-status-awaiting-requester-review,
.ha-status-badge.ha-status-awaiting-review {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    white-space: nowrap !important;
    min-width: max-content !important;
    padding: 7px 12px !important;
    font-weight: 800 !important;
}

.tmjr-badge.tmjr-badge-attention-pending,
.tmjr-badge.tmjr-badge-attention-locked,
.tmjr-badge.tmjr-badge-attention-more-info-required,
.tmjr-badge.tmjr-badge-awaiting-requester-review,
.tmjr-badge.tmjr-badge-awaiting-review,
.ha-status-badge.ha-status-attention-pending,
.ha-status-badge.ha-status-attention-locked,
.ha-status-badge.ha-status-attention-more-info-required,
.ha-status-badge.ha-status-awaiting-requester-review,
.ha-status-badge.ha-status-awaiting-review {
    animation-duration: 2.1s !important;
}

@keyframes tmjrAwaitingRequesterReviewPulse {
    0%, 100% {
        background: #fffaeb;
        border-color: #f59e0b;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.48);
    }
    50% {
        background: #fef3c7;
        border-color: #d97706;
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.18);
    }
}

@keyframes tmjrPendingPulse {
    0%, 100% {
        background: #fffaeb;
        box-shadow: 0 0 0 0 rgba(247, 144, 9, 0.48);
    }
    50% {
        background: #fef0c7;
        box-shadow: 0 0 0 8px rgba(247, 144, 9, 0.18);
    }
}

@keyframes tmjrLockedPulse {
    0%, 100% {
        background: #fff7ed;
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.48);
    }
    50% {
        background: #fed7aa;
        box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.18);
    }
}

@keyframes tmjrMoreInfoPulse {
    0%, 100% {
        background: #eff8ff;
        box-shadow: 0 0 0 0 rgba(46, 144, 250, 0.46);
    }
    50% {
        background: #d1e9ff;
        box-shadow: 0 0 0 8px rgba(46, 144, 250, 0.18);
    }
}

/* Phase 8D: request form clear-section controls */
.tmjr-step > .tmjr-card {
    position: relative;
}

.tmjr-clear-section-btn {
    position: absolute;
    top: 22px;
    right: 22px;
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.tmjr-clear-section-btn:hover,
.tmjr-clear-section-btn:focus-visible {
    background: #b42318;
    border-color: #b42318;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(180, 35, 24, 0.18);
    outline: none;
}

.tmjr-step > .tmjr-card:has(.tmjr-clear-section-btn) > h3:first-child {
    padding-right: 150px;
}

@media (max-width: 760px) {
    .tmjr-clear-section-btn {
        position: static;
        margin: 0 0 14px;
    }

    .tmjr-step > .tmjr-card:has(.tmjr-clear-section-btn) > h3:first-child {
        padding-right: 0;
    }
}

/* Phase 8E: cancellation status display */
.ha-status-cancelled,
.ha-status-request-cancelled,
.tmjr-badge.tmjr-badge-cancelled,
.tmjr-badge.tmjr-badge-request-cancelled {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
    font-weight: 800 !important;
}

.tmjr-stage-cancelled {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}


/* Hatton Assist v1.10.33 - grouped Health & Safety navigation */
.tmjr-nav-group {
    position: relative;
    display: inline-block;
}

.tmjr-nav-group > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.tmjr-nav-group > summary::-webkit-details-marker {
    display: none;
}

.tmjr-nav-group-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.tmjr-nav-group.is-active > .tmjr-nav-group-toggle,
.tmjr-nav-group[open] > .tmjr-nav-group-toggle {
    background: #1f6fff;
    color: #ffffff;
    border-color: #1f6fff;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(31, 111, 255, 0.18);
}

.tmjr-nav-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.16s ease;
}

.tmjr-nav-group[open] .tmjr-nav-caret {
    transform: rotate(180deg);
}

.tmjr-nav-dropdown {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #d9e2f0;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.tmjr-nav-dropdown .tmjr-nav-link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    border-radius: 10px;
    box-shadow: none;
    margin: 0;
    white-space: nowrap;
}

.tmjr-nav-dropdown .tmjr-nav-link + .tmjr-nav-link {
    margin-top: 6px;
}

.tmjr-nav-dropdown .tmjr-nav-link.is-active {
    box-shadow: none;
}

@media (max-width: 900px) {
    .tmjr-nav-group {
        width: 100%;
    }

    .tmjr-nav-group > .tmjr-nav-group-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .tmjr-nav-dropdown {
        position: static;
        margin-top: 8px;
        min-width: 0;
        width: 100%;
    }
}

/* v1.10.45 H&S navigation polish */
.tmjr-nav-dropdown-heading {
    display: block;
    padding: 8px 12px 4px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.tmjr-nav-dropdown-divider {
    display: block;
    height: 1px;
    margin: 6px 10px;
    background: rgba(148, 163, 184, 0.35);
}


/* v1.10.60: IMS Import / Export layout visibility fix.
   The import/export page has its own safe wrapper. Keep it aligned with the
   standard Hatton Assist shell so the fixed sidebar and right workspace render
   together instead of the content appearing underneath or outside the sidebar. */
body.hatton-assist-body #hatton-assist-root > .tmjr-ims-import-export-safe-layout,
body.hatton-assist-body .tmjr-ims-import-export-safe-layout {
    display: block !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 22px 18px 314px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #f5f7fb !important;
    box-sizing: border-box !important;
    scroll-padding-bottom: 18px !important;
}

body.hatton-assist-body .tmjr-ims-import-export-safe-layout > .tmjr-module-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    width: 292px !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 18px 18px 0 !important;
    grid-row: auto !important;
    grid-column: auto !important;
}

body.hatton-assist-body .tmjr-ims-import-export-safe-layout > .tmjr-ims-import-export-main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.hatton-assist-body .tmjr-ims-import-export-main > * {
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 900px) {
    body.hatton-assist-body #hatton-assist-root > .tmjr-ims-import-export-safe-layout,
    body.hatton-assist-body .tmjr-ims-import-export-safe-layout {
        height: auto !important;
        min-height: 100vh !important;
        padding: 0 14px 18px !important;
        overflow: visible !important;
    }

    body.hatton-assist-body .tmjr-ims-import-export-safe-layout > .tmjr-module-sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        border-radius: 0 0 18px 18px !important;
        margin-bottom: 16px !important;
    }
}

/* v1.10.61: IMS admin layout consolidation. */
.tmjr-wrap.tmjr-ims-register-page {
    min-height: 100vh;
}

.tmjr-wrap.tmjr-ims-register-page .tmjr-main,
.tmjr-wrap.tmjr-ims-register-page .tmjr-hs-main {
    min-width: 0;
}

.tmjr-ims-import-export-page .tmjr-ims-import-export-main {
    display: block;
    min-width: 0;
}

/* v1.10.83: compact PAS 2080 navigation grouping */
.tmjr-nav-nested-group {
    margin-top: 6px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.96);
    overflow: hidden;
}

.tmjr-nav-nested-group > summary {
    list-style: none;
    cursor: pointer;
}

.tmjr-nav-nested-group > summary::-webkit-details-marker {
    display: none;
}

.tmjr-nav-nested-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #123052;
    font-weight: 800;
    white-space: nowrap;
}

.tmjr-nav-nested-group.is-active .tmjr-nav-nested-summary {
    color: #0f5fe8;
    background: rgba(31, 111, 255, 0.08);
}

.tmjr-nav-nested-group[open] > .tmjr-nav-nested-summary .tmjr-nav-caret {
    transform: rotate(180deg);
}

.tmjr-nav-nested-links {
    display: grid;
    gap: 6px;
    padding: 0 8px 8px;
}

.tmjr-nav-dropdown .tmjr-nav-nested-links .tmjr-nav-link {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 9px;
    background: #ffffff;
}

.tmjr-nav-dropdown .tmjr-nav-nested-links .tmjr-nav-link + .tmjr-nav-link {
    margin-top: 0;
}

/* v1.11.06: H&S navigation grouping and usability tidy-up */
.tmjr-nav-dropdown.tmjr-nav-dropdown-wide {
    min-width: 720px;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
    padding: 10px;
}

.tmjr-nav-menu-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.72);
}

.tmjr-nav-menu-section .tmjr-nav-dropdown-heading {
    padding: 2px 4px 4px;
}

.tmjr-nav-menu-section .tmjr-nav-link {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 13px;
    background: #ffffff;
}

.tmjr-nav-section-hint {
    display: block;
    margin-top: 4px;
    padding: 0 4px 2px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.tmjr-nav-menu-section-pas .tmjr-nav-nested-group {
    margin-top: 0;
}

.tmjr-nav-menu-section-muted {
    justify-content: center;
    background: rgba(241, 245, 249, 0.8);
}

@media (max-width: 980px) {
    .tmjr-nav-dropdown.tmjr-nav-dropdown-wide {
        min-width: 0;
        grid-template-columns: 1fr;
    }
}

/* v1.11.19: Global user appearance preferences */
body.tmjr-appearance-light,
body.tmjr-appearance-dark {
    --tmjr-app-bg: var(--tmjr-user-app-bg, #f5f7fb);
    --tmjr-panel-bg: var(--tmjr-user-panel-bg, #ffffff);
    --tmjr-panel-alt-bg: var(--tmjr-user-panel-alt-bg, #f8fafc);
    --tmjr-text-colour: var(--tmjr-user-text, #0f172a);
    --tmjr-muted-colour: var(--tmjr-user-muted, #64748b);
    --tmjr-border-colour: var(--tmjr-user-border, #e5e7eb);
}

body.tmjr-appearance-light #hatton-assist-root > .tmjr-wrap,
body.tmjr-appearance-light .tmjr-wrap:has(> .tmjr-module-sidebar),
body.tmjr-appearance-dark #hatton-assist-root > .tmjr-wrap,
body.tmjr-appearance-dark .tmjr-wrap:has(> .tmjr-module-sidebar) {
    background: var(--tmjr-app-bg) !important;
}

body.tmjr-appearance-light .tmjr-card,
body.tmjr-appearance-light .tmjr-dashboard-card,
body.tmjr-appearance-light .tmjr-ha-dashboard-card,
body.tmjr-appearance-light .tmjr-operations-nav-wrap,
body.tmjr-appearance-light .tmjr-table-wrap,
body.tmjr-appearance-dark .tmjr-card,
body.tmjr-appearance-dark .tmjr-dashboard-card,
body.tmjr-appearance-dark .tmjr-ha-dashboard-card,
body.tmjr-appearance-dark .tmjr-operations-nav-wrap,
body.tmjr-appearance-dark .tmjr-table-wrap {
    background: var(--tmjr-panel-bg) !important;
    border-color: var(--tmjr-border-colour) !important;
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-card h1,
body.tmjr-appearance-dark .tmjr-card h2,
body.tmjr-appearance-dark .tmjr-card h3,
body.tmjr-appearance-dark .tmjr-card h4,
body.tmjr-appearance-dark .tmjr-operations-nav-wrap h1,
body.tmjr-appearance-dark .tmjr-operations-nav-wrap h2,
body.tmjr-appearance-dark .tmjr-ha-dashboard-card h1,
body.tmjr-appearance-dark .tmjr-ha-dashboard-card h2,
body.tmjr-appearance-dark .tmjr-ha-dashboard-card h3,
body.tmjr-appearance-dark .tmjr-profile-name,
body.tmjr-appearance-dark .tmjr-stat-number,
body.tmjr-appearance-dark .tmjr-stat-label {
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-muted,
body.tmjr-appearance-dark .tmjr-dashboard-subtitle,
body.tmjr-appearance-dark .tmjr-operations-nav-actions p,
body.tmjr-appearance-dark .tmjr-card small,
body.tmjr-appearance-dark .tmjr-inline-info-label {
    color: var(--tmjr-muted-colour) !important;
}

body.tmjr-appearance-dark input,
body.tmjr-appearance-dark select,
body.tmjr-appearance-dark textarea,
body.tmjr-appearance-dark .tmjr-profile-summary,
body.tmjr-appearance-dark .tmjr-inline-info-box,
body.tmjr-appearance-dark .tmjr-filter-bar,
body.tmjr-appearance-dark .tmjr-table th,
body.tmjr-appearance-dark .tmjr-table td {
    background: var(--tmjr-panel-alt-bg) !important;
    border-color: var(--tmjr-border-colour) !important;
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-table th {
    background: #0f172a !important;
}

.tmjr-profile-appearance-card {
    margin-top: 22px;
}

.tmjr-profile-appearance-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.tmjr-profile-appearance-header h3 {
    margin: 2px 0 6px;
}

.tmjr-appearance-current-mode {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e6f5f2;
    color: #0f766e;
    font-weight: 800;
    font-size: 12px;
    padding: 7px 11px;
    white-space: nowrap;
}

.tmjr-appearance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.tmjr-appearance-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin: 0 0 16px;
    background: #f8fafc;
}

.tmjr-appearance-fieldset legend {
    padding: 0 8px;
    font-weight: 800;
    color: #102a43;
}

.tmjr-appearance-option-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tmjr-appearance-mode-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tmjr-appearance-choice {
    display: block;
    cursor: pointer;
}

.tmjr-appearance-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tmjr-appearance-choice-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 112px;
    border: 1px solid #d9e2ec;
    border-radius: 15px;
    padding: 14px;
    background: #ffffff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tmjr-appearance-choice-compact .tmjr-appearance-choice-body {
    min-height: 92px;
}

.tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body {
    border-color: #1f6fff;
    box-shadow: 0 14px 30px rgba(31, 111, 255, 0.16);
    transform: translateY(-1px);
}

.tmjr-appearance-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1f6fff;
    font-weight: 900;
}

.tmjr-appearance-choice-body strong {
    color: #102a43;
}

.tmjr-appearance-choice-body small {
    color: #64748b;
    line-height: 1.35;
}

.tmjr-appearance-colour-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tmjr-appearance-colour-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    background: #ffffff;
    font-weight: 800;
    color: #102a43;
}

.tmjr-appearance-colour-control input[type="color"] {
    width: 58px;
    height: 38px;
    padding: 2px;
    border-radius: 10px;
}

.tmjr-appearance-colour-control select {
    min-width: 160px;
}

.tmjr-appearance-preview-wrap {
    position: sticky;
    top: 18px;
}

.tmjr-appearance-preview-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.tmjr-appearance-preview {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    min-height: 248px;
    border: 1px solid #d9e2ec;
    border-radius: 20px;
    padding: 14px;
    background: #f5f7fb;
    overflow: hidden;
}

.tmjr-appearance-preview-sidebar {
    border-radius: 16px;
    background: #102a43;
    padding: 16px 10px;
}

.tmjr-appearance-preview-sidebar span {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.5);
    margin-bottom: 12px;
}

.tmjr-appearance-preview-sidebar span:first-child {
    width: 70%;
    background: #ffffff;
}

.tmjr-appearance-preview-main {
    min-width: 0;
}

.tmjr-appearance-preview-topbar,
.tmjr-appearance-preview-card {
    border: 1px solid rgba(148, 163, 184, .45);
    border-radius: 16px;
    background: #ffffff;
}

.tmjr-appearance-preview-topbar {
    height: 46px;
    margin-bottom: 12px;
}

.tmjr-appearance-preview-card {
    padding: 16px;
}

.tmjr-appearance-preview-card strong,
.tmjr-appearance-preview-card span {
    display: block;
}

.tmjr-appearance-preview-card span {
    color: #64748b;
    margin-top: 5px;
}

.tmjr-appearance-preview-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.tmjr-appearance-preview-row i {
    display: block;
    height: 42px;
    border-radius: 12px;
    background: #eef4ff;
}

.tmjr-appearance-actions {
    border-top: 1px solid #edf1f5;
    padding-top: 18px;
}

body.tmjr-appearance-dark .tmjr-profile-appearance-card .tmjr-appearance-fieldset,
body.tmjr-appearance-dark .tmjr-profile-appearance-card .tmjr-appearance-choice-body,
body.tmjr-appearance-dark .tmjr-profile-appearance-card .tmjr-appearance-colour-control {
    background: var(--tmjr-panel-alt-bg) !important;
    border-color: var(--tmjr-border-colour) !important;
}

body.tmjr-appearance-dark .tmjr-profile-appearance-card legend,
body.tmjr-appearance-dark .tmjr-profile-appearance-card strong,
body.tmjr-appearance-dark .tmjr-profile-appearance-card h3,
body.tmjr-appearance-dark .tmjr-profile-appearance-card span {
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-profile-appearance-card small,
body.tmjr-appearance-dark .tmjr-profile-appearance-card .tmjr-muted {
    color: var(--tmjr-muted-colour) !important;
}

@media (max-width: 1100px) {
    .tmjr-appearance-layout {
        grid-template-columns: 1fr;
    }

    .tmjr-appearance-preview-wrap {
        position: static;
    }
}

@media (max-width: 760px) {
    .tmjr-profile-appearance-header,
    .tmjr-appearance-option-row,
    .tmjr-appearance-mode-row,
    .tmjr-appearance-colour-grid {
        grid-template-columns: 1fr;
    }

    .tmjr-profile-appearance-header {
        display: block;
    }

    .tmjr-appearance-current-mode {
        margin-top: 10px;
    }
}

body.tmjr-appearance-dark .tmjr-hs-dashboard-command-centre,
body.tmjr-appearance-dark .tmjr-hs-dashboard-command-card,
body.tmjr-appearance-dark .tmjr-hs-recommended-step,
body.tmjr-appearance-dark .tmjr-hs-compliance-mini-card,
body.tmjr-appearance-dark .tmjr-hs-ims-kpi-card,
body.tmjr-appearance-dark .tmjr-hs-ims-register-card {
    background: var(--tmjr-panel-bg) !important;
    border-color: var(--tmjr-border-colour) !important;
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-hs-dashboard-command-card strong,
body.tmjr-appearance-dark .tmjr-hs-recommended-step strong,
body.tmjr-appearance-dark .tmjr-hs-dashboard-command-card b,
body.tmjr-appearance-dark .tmjr-hs-recommended-step b {
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-hs-dashboard-command-card em,
body.tmjr-appearance-dark .tmjr-hs-recommended-step em,
body.tmjr-appearance-dark .tmjr-hs-card-subtitle {
    color: var(--tmjr-muted-colour) !important;
}


/* v1.11.20: Global appearance fixes — apply the selected background to the full app shell and preserve button/readability contrast. */
body.tmjr-appearance-light,
body.tmjr-appearance-dark,
body.tmjr-appearance-light #hatton-assist-root,
body.tmjr-appearance-dark #hatton-assist-root {
    background: var(--tmjr-app-bg) !important;
}

body.tmjr-appearance-light #hatton-assist-root,
body.tmjr-appearance-dark #hatton-assist-root {
    min-height: 100vh;
}

body.tmjr-appearance-dark .tmjr-stat-card,
body.tmjr-appearance-dark .tmjr-profile-side-card,
body.tmjr-appearance-dark .tmjr-dashboard-card .tmjr-stat-card,
body.tmjr-appearance-dark .tmjr-ha-dashboard-card .tmjr-stat-card {
    background: var(--tmjr-panel-alt-bg) !important;
    border-color: var(--tmjr-border-colour) !important;
    color: var(--tmjr-text-colour) !important;
}

body.tmjr-appearance-dark .tmjr-nav .tmjr-nav-link:not(.is-active),
body.tmjr-appearance-dark .tmjr-operations-nav-wrap .tmjr-nav-link:not(.is-active) {
    background: #1f2937 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    opacity: 1 !important;
}

body.tmjr-appearance-dark .tmjr-nav .tmjr-nav-link:not(.is-active):hover,
body.tmjr-appearance-dark .tmjr-operations-nav-wrap .tmjr-nav-link:not(.is-active):hover {
    background: #273449 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

body.tmjr-appearance-dark .tmjr-nav .tmjr-nav-link.is-active,
body.tmjr-appearance-dark .tmjr-operations-nav-wrap .tmjr-nav-link.is-active {
    background: #1f6fff !important;
    border-color: #1f6fff !important;
    color: #ffffff !important;
}

body.tmjr-appearance-dark .tmjr-btn-secondary,
body.tmjr-appearance-dark a.tmjr-btn-secondary,
body.tmjr-appearance-dark button.tmjr-btn-secondary,
body.tmjr-appearance-dark .tmjr-wizard-nav button.tmjr-btn-secondary {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}

body.tmjr-appearance-dark .tmjr-account-dropdown {
    background: #ffffff !important;
    border-color: #d0d5dd !important;
    color: #1f2937 !important;
}

body.tmjr-appearance-dark .tmjr-account-dropdown-link {
    color: #1f2937 !important;
}

body.tmjr-appearance-dark .tmjr-account-dropdown-link:hover,
body.tmjr-appearance-dark .tmjr-account-dropdown-link:focus-visible {
    background: #f8fafc !important;
    color: #175cd3 !important;
}

body.tmjr-appearance-dark .tmjr-account-dropdown-meta-link small {
    color: #667085 !important;
}

body.tmjr-appearance-dark .tmjr-dashboard-filter select,
body.tmjr-appearance-dark .tmjr-operations-filter-grid input[type="text"],
body.tmjr-appearance-dark .tmjr-operations-filter-grid input[type="search"],
body.tmjr-appearance-dark .tmjr-operations-filter-grid input[type="date"],
body.tmjr-appearance-dark .tmjr-operations-filter-grid select,
body.tmjr-appearance-dark .tmjr-filter-grid-compact input[type="text"],
body.tmjr-appearance-dark .tmjr-filter-grid-compact input[type="search"],
body.tmjr-appearance-dark .tmjr-filter-grid-compact input[type="date"],
body.tmjr-appearance-dark .tmjr-filter-grid-compact select {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}


/* v1.11.22: Global appearance background and selected-option visibility fixes.
   The app shell has several historic fixed-layout background overrides, so these
   selectors deliberately target the exact full-screen shell and common theme wrappers. */
html:has(body.tmjr-appearance-light),
html:has(body.tmjr-appearance-dark),
body.tmjr-appearance-light,
body.tmjr-appearance-dark,
body.hatton-assist-body.tmjr-appearance-light,
body.hatton-assist-body.tmjr-appearance-dark,
body.tmjr-appearance-light #page,
body.tmjr-appearance-dark #page,
body.tmjr-appearance-light .site,
body.tmjr-appearance-dark .site,
body.tmjr-appearance-light #content,
body.tmjr-appearance-dark #content,
body.tmjr-appearance-light .site-content,
body.tmjr-appearance-dark .site-content,
body.tmjr-appearance-light .entry-content,
body.tmjr-appearance-dark .entry-content,
body.tmjr-appearance-light #hatton-assist-root,
body.tmjr-appearance-dark #hatton-assist-root,
body.hatton-assist-body.tmjr-appearance-light #hatton-assist-root,
body.hatton-assist-body.tmjr-appearance-dark #hatton-assist-root,
body.hatton-assist-body.tmjr-appearance-light #hatton-assist-root > .tmjr-wrap,
body.hatton-assist-body.tmjr-appearance-dark #hatton-assist-root > .tmjr-wrap,
body.hatton-assist-body.tmjr-appearance-light #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body.tmjr-appearance-dark #hatton-assist-root > .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body.tmjr-appearance-light .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body.tmjr-appearance-dark .tmjr-wrap:has(> .tmjr-module-sidebar),
body.tmjr-appearance-light .tmjr-wrap,
body.tmjr-appearance-dark .tmjr-wrap,
body.tmjr-appearance-light .tmjr-wrap:has(> .tmjr-module-sidebar),
body.tmjr-appearance-dark .tmjr-wrap:has(> .tmjr-module-sidebar) {
    background: var(--tmjr-app-bg) !important;
}

body.tmjr-appearance-light .tmjr-wrap:has(> .tmjr-module-sidebar),
body.tmjr-appearance-dark .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body.tmjr-appearance-light #hatton-assist-root > .tmjr-wrap,
body.hatton-assist-body.tmjr-appearance-dark #hatton-assist-root > .tmjr-wrap,
body.hatton-assist-body.tmjr-appearance-light .tmjr-wrap:has(> .tmjr-module-sidebar),
body.hatton-assist-body.tmjr-appearance-dark .tmjr-wrap:has(> .tmjr-module-sidebar) {
    min-height: 100vh !important;
}

body.tmjr-appearance-light .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body,
body.tmjr-appearance-dark .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body {
    border-color: #1f6fff !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 255, .28), 0 16px 34px rgba(15, 23, 42, .22) !important;
    outline: 2px solid rgba(31, 111, 255, .92) !important;
    outline-offset: 2px !important;
    transform: translateY(-1px);
}

body.tmjr-appearance-dark .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body {
    background: #172338 !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .35), 0 16px 34px rgba(0, 0, 0, .34) !important;
    outline-color: rgba(96, 165, 250, .95) !important;
}

body.tmjr-appearance-light .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body::before,
body.tmjr-appearance-dark .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body::before {
    content: 'Selected';
    align-self: flex-end;
    border-radius: 999px;
    padding: 4px 9px;
    background: #1f6fff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1;
    order: -1;
}

body.tmjr-appearance-dark .tmjr-appearance-choice input:checked + .tmjr-appearance-choice-body::before {
    background: #60a5fa;
    color: #0f172a;
}

body.tmjr-appearance-dark .tmjr-appearance-current-mode {
    background: #172338 !important;
    border: 1px solid #60a5fa !important;
    color: #e0f2fe !important;
}

body.tmjr-appearance-light .tmjr-appearance-current-mode {
    border: 1px solid #bfdbfe !important;
    color: #175cd3 !important;
}
