/*
 * 文件用途：页面通用样式，集中存放 pages 下抽离出的内联 CSS。
 */

/* 图标字体采用 swap，减少首屏图标延迟显示 */
@font-face {
	font-family: "remixicon";
	src: url("./velzon/assets/fonts/remixicon.woff2") format("woff2"),
		url("./velzon/assets/fonts/remixicon.woff") format("woff"),
		url("./velzon/assets/fonts/remixicon.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* Material Design Icons 也设置 swap，避免同类闪现 */
@font-face {
	font-family: "Material Design Icons";
	src: url("./velzon/assets/fonts/materialdesignicons-webfont.woff2?v=7.2.96") format("woff2"),
		url("./velzon/assets/fonts/materialdesignicons-webfont.woff?v=7.2.96") format("woff"),
		url("./velzon/assets/fonts/materialdesignicons-webfont.ttf?v=7.2.96") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

#accountTable th,
#accountTable td,
.bootstrap-table .table th,
.bootstrap-table .table td {
	white-space: nowrap;
}

/* Keep task page filters stable on first paint to avoid full-width flash. */
#taskTableToolbar .control-task-filter-select {
	width: 180px;
	min-width: 180px;
	max-width: 240px;
	flex: 0 0 180px;
}

/* Keep account page filters stable on first paint to avoid full-width flash. */
#accountTableToolbar .control-account-filter-select {
	width: 180px;
	min-width: 180px;
	max-width: 240px;
	flex: 0 0 180px;
}

.platform-item-card .platform-action-wrap {
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.platform-item-card:hover .platform-action-wrap {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.worker-item-card .worker-action-wrap {
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.worker-item-card:hover .worker-action-wrap {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

#templateList {
	row-gap: 0.6rem !important;
}

.template-platform-group {
	margin-bottom: 0.9rem;
}

.template-platform-group:last-child {
	margin-bottom: 0;
}

.template-platform-group-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.3rem 0.1rem 0.45rem;
	border-bottom: 1px solid #e2e7f6;
	margin-bottom: 0.55rem;
}

.template-platform-group-title {
	font-size: 0.96rem;
	font-weight: 700;
	line-height: 1.2;
	color: #33426a;
	letter-spacing: 0.01em;
}

.template-type-group {
	margin-bottom: 0.6rem;
}

.template-type-group:last-child {
	margin-bottom: 0;
}

.template-type-group-title {
	display: inline-flex;
	align-items: center;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0.24rem 0.46rem;
	border-radius: 999px;
	background: #eef3ff;
	color: #4266b1;
	border: 1px solid #d6e2ff;
	margin: 0.08rem 0 0.45rem;
}

.template-list-card {
	height: 100%;
	border: 1px solid #d6dcf3;
	border-radius: 0.38rem;
	background: linear-gradient(155deg, #f7fbff 0%, #f5f8ff 100%);
	box-shadow: 0 4px 14px rgba(83, 112, 166, 0.12);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
	overflow: hidden;
	position: relative;
}

.template-list-card:hover {
	transform: translateY(-1px);
	border-color: #c2d0ef;
	box-shadow: 0 8px 20px rgba(83, 112, 166, 0.2);
}

.template-list-card-login {
	border-color: #c6e5d4;
	background: linear-gradient(155deg, #f5fff8 0%, #effcf4 100%);
	box-shadow: 0 4px 14px rgba(47, 143, 89, 0.14);
}

.template-list-card-login:hover {
	border-color: #a9d8bf;
	box-shadow: 0 8px 20px rgba(47, 143, 89, 0.22);
}

.template-list-card-other {
	border-color: #c8daf8;
	background: linear-gradient(155deg, #f4f9ff 0%, #edf5ff 100%);
	box-shadow: 0 4px 14px rgba(60, 112, 201, 0.14);
}

.template-list-card-other:hover {
	border-color: #aecdff;
	box-shadow: 0 8px 20px rgba(60, 112, 201, 0.22);
}

.template-list-card .card-body {
	display: block;
	padding: 0.62rem 2.45rem 0.62rem 0.62rem;
	min-height: 84px;
}

.template-type-corner {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.58rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.34rem 0.5rem;
	border-radius: 0 0.38rem 0 0.38rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border: none;
	background: #f6f0ff;
	color: #6b5aa6;
	max-width: calc(100% - 0.2rem);
	box-shadow: 0 2px 8px rgba(84, 70, 120, 0.15);
}

.template-type-corner-login {
	background: #eaf9ef;
	border-color: #bfe8cf;
	color: #2f8f59;
}

.template-type-corner-other {
	background: #e9f2ff;
	border-color: #c4dcff;
	color: #3c70c9;
}

.template-icon-zone {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 33.3333%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #eef6ff 0%, #e7f1ff 100%);
	border-right: 1px solid #cddcf4;
}

.template-list-card-login .template-icon-zone {
	background: linear-gradient(180deg, #e9f9ef 0%, #dff3e7 100%);
	border-right-color: #bfe1ce;
}

.template-list-card-other .template-icon-zone {
	background: linear-gradient(180deg, #e9f2ff 0%, #dfebff 100%);
	border-right-color: #c1d6fb;
}

.template-icon-wrap {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.24rem;
	max-width: calc(100% - 0.4rem);
}

.template-content-zone {
	position: absolute;
	left: 33.3333%;
	right: 2.2rem;
	top: 0;
	bottom: 0;
	display: block;
	padding: 0 0.45rem 0 0.7rem;
}

.template-avatar {
	position: static;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: 1px solid #d6cfee;
	background: #fff4f8;
	object-fit: cover;
}

.template-avatar-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.62rem;
	font-weight: 700;
	color: #6b5aa6;
	text-transform: uppercase;
}

.template-platform-text {
	max-width: 100%;
	font-size: 0.62rem;
	font-weight: 600;
	line-height: 1.1;
	color: #6d6c9f;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.template-name-text {
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.25;
	color: #3d3a67;
	max-width: 100%;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.template-text-stack {
	position: relative;
	width: 100%;
	height: 100%;
}

.template-type-right {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(calc(-50% - 1.45rem));
	font-size: 0.58rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.22rem 0.4rem;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border: 1px solid #d8d2ef;
	background: #f6f0ff;
	color: #6b5aa6;
	max-width: calc(100% - 0.2rem);
}

.template-text-stack .template-name-text {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
}

.template-type-badge {
	font-size: 0.66rem;
	font-weight: 600;
	padding: 0.18rem 0.42rem;
	border-radius: 999px;
	background: #fff1dd;
	color: #8f4f00;
	border: 1px solid #ffd7a8;
}

.template-actions .btn {
	padding: 0.17rem 0.32rem;
	line-height: 1;
	border-color: #cfc7ea;
	background: rgba(255, 255, 255, 0.88);
}

.template-actions .btn.btn-outline-primary {
	color: #3c70c9;
	border-color: #aecdff;
}

.template-actions .btn.btn-outline-primary:hover,
.template-actions .btn.btn-outline-primary:focus,
.template-actions .btn.btn-outline-primary:active {
	color: #ffffff;
	background: #3c70c9;
	border-color: #3c70c9;
}

.template-actions .btn.btn-outline-danger {
	color: #d9534f;
	border-color: #f3b3b0;
}

.template-actions .btn.btn-outline-danger:hover,
.template-actions .btn.btn-outline-danger:focus,
.template-actions .btn.btn-outline-danger:active {
	color: #ffffff;
	background: #d9534f;
	border-color: #d9534f;
}

.template-actions .btn i {
	font-size: 0.82rem;
}

.template-float-actions {
	position: absolute;
	right: 0.36rem;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 0.26rem;
}

.template-list-empty {
	padding: 2rem 1rem;
	text-align: center;
	color: #878a99;
}

/* Task page shared styles moved from inline CSS. */
#taskTable .control-task-status-badge {
	text-transform: capitalize;
}

#taskTable .control-task-status-badge-in-progress {
	display: inline-block;
	border: 1px solid transparent !important;
	color: #0a58ca !important;
	background: linear-gradient(#ffffff, #ffffff) padding-box,
		repeating-linear-gradient(90deg, #0d6efd 0 12px, #2dd4bf 12px 24px, #22c55e 24px 36px, #f59e0b 36px 48px, #ef4444 48px 60px, #8b5cf6 60px 72px) border-box;
	background-size: 100% 100%, 200% 100%;
	background-position: 0 0, 0 0;
	animation: controlTaskInProgressBorderFlow 1.6s linear infinite;
}

@keyframes controlTaskInProgressBorderFlow {
	to {
		background-position: 0 0, -72px 0;
	}
}

#addTaskModal .control-add-task-modal-content {
	height: 80vh;
	max-height: calc(100vh - 2rem);
	display: flex;
	flex-direction: column;
}

#addTaskModal .control-add-task-form {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

#addTaskModal .control-add-task-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

#editTaskModal .control-edit-task-modal-content {
	height: 80vh;
	max-height: calc(100vh - 2rem);
	display: flex;
	flex-direction: column;
}

#editTaskModal .control-edit-task-form {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

#editTaskModal .control-edit-task-modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

#taskVarDataModal .modal-content {
	height: 70vh;
	max-height: calc(100vh - 2rem);
	display: flex;
	flex-direction: column;
}

#taskVarDataModal .modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

#taskRunTimelineModal .modal-content {
	height: 70vh;
	max-height: calc(100vh - 2rem);
	display: flex;
	flex-direction: column;
}

#taskRunTimelineModal .modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

.control-run-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	--control-run-axis-gap: 2.25rem;
}

.control-run-timeline::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	margin-left: -1px;
	background: #e9ecef;
}

.control-run-timeline-item {
	position: relative;
	width: calc(50% - var(--control-run-axis-gap));
	padding: 0.55rem 0.7rem;
	margin-bottom: 0.9rem;
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 0.45rem;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	padding-bottom: 0.7rem;
}

.control-run-timeline-item.is-left {
	margin-right: auto;
	text-align: right;
}

.control-run-timeline-item.is-right {
	margin-left: auto;
	text-align: left;
}

.control-run-timeline-item-head {
	width: 100%;
}

.control-run-timeline-item.is-left .control-run-timeline-item-head {
	flex-direction: row-reverse;
}

.control-run-timeline-item.is-left .control-run-timeline-item-meta {
	text-align: right;
}

.control-run-timeline-item.is-right .control-run-timeline-item-meta {
	text-align: left;
}

.control-run-timeline-item-title-row {
	line-height: 1.2;
	margin-bottom: 0.15rem;
}

.control-run-timeline-item-status-row {
	line-height: 1;
}

.control-run-timeline-item-body {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
}

.control-run-timeline-item-content {
	flex: 1 1 auto;
	min-width: 0;
}

.control-run-timeline-item-media {
	flex: 0 0 auto;
	align-self: flex-start;
}

.control-run-timeline-item.is-left .control-run-timeline-item-body {
	flex-direction: row-reverse;
}

.control-run-timeline-item.is-left .control-run-timeline-item-content {
	text-align: right;
}

.control-run-timeline-item.is-right .control-run-timeline-item-content {
	text-align: left;
}

.control-run-timeline-item-title-row .badge {
	vertical-align: middle;
}

.control-run-timeline-item:last-child {
	margin-bottom: 0;
}

.control-run-timeline-item::before {
	content: '';
	position: absolute;
	top: 1.05rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: #adb5bd;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #d5d8dc;
}

.control-run-timeline-item.is-left::before {
	right: calc((var(--control-run-axis-gap) * -1) - 0.375rem);
}

.control-run-timeline-item.is-right::before {
	left: calc((var(--control-run-axis-gap) * -1) - 0.375rem);
}

.control-run-timeline-item.status-completed::before,
.control-run-timeline-item.status-success::before {
	background: #198754;
}

.control-run-timeline-item.status-failed::before,
.control-run-timeline-item.status-interrupt::before {
	background: #dc3545;
}

.control-run-timeline-item.status-running::before {
	background: #0d6efd;
}

.control-run-timeline-item.status-queued::before {
	background: #0dcaf0;
}

.control-run-timeline-skeleton .control-run-timeline-item {
	border-color: #edf0f2;
	box-shadow: none;
}

.control-run-skeleton-line {
	height: 0.62rem;
	border-radius: 999px;
	background: linear-gradient(90deg, #eef1f3 25%, #f6f8fa 37%, #eef1f3 63%);
	background-size: 400% 100%;
	animation: controlRunSkeletonShimmer 1.25s ease-in-out infinite;
}

.control-run-skeleton-line.w-65 {
	width: 65%;
}

.control-run-skeleton-line.w-55 {
	width: 55%;
}

.control-run-skeleton-line.w-50 {
	width: 50%;
}

.control-run-skeleton-line.w-45 {
	width: 45%;
}

@keyframes controlRunSkeletonShimmer {
	0% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0 50%;
	}
}

@media (max-width: 767.98px) {
	.control-run-timeline::before {
		left: 0.7rem;
	}

	.control-run-timeline-item {
		width: auto;
		margin-left: 1.6rem;
		margin-right: 0;
		text-align: left;
	}

	.control-run-timeline-item.is-left,
	.control-run-timeline-item.is-right {
		margin-left: 1.6rem;
		margin-right: 0;
	}

	.control-run-timeline-item::before,
	.control-run-timeline-item.is-left::before,
	.control-run-timeline-item.is-right::before {
		left: -1.34rem;
		right: auto;
	}

	.control-run-timeline-item.is-left .control-run-timeline-item-head,
	.control-run-timeline-item.is-right .control-run-timeline-item-head {
		flex-direction: row;
	}

	.control-run-timeline-item-body,
	.control-run-timeline-item.is-left .control-run-timeline-item-body {
		flex-direction: row;
	}

	.control-run-timeline-item.is-left .control-run-timeline-item-meta,
	.control-run-timeline-item.is-right .control-run-timeline-item-meta,
	.control-run-timeline-item.is-left .control-run-timeline-item-content,
	.control-run-timeline-item.is-right .control-run-timeline-item-content {
		text-align: left;
	}
}

.control-run-history-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

.control-run-step-screenshot-link {
	display: inline-block;
	margin-top: 0;
}

.control-run-step-screenshot {
	display: block;
	width: 112px;
	height: 84px;
	object-fit: cover;
	border-radius: 0.35rem;
	border: 1px solid #dee2e6;
	background: #f8f9fa;
}

.bootstrap-table .fixed-table-toolbar .refresh button.control-task-refresh-btn {
	position: relative;
	overflow: visible;
}

.control-task-refresh-countdown-badge {
	position: absolute;
	inset: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	font-weight: 900;
	line-height: 1;
	color: #dc3741a6;
	background: transparent;
	box-shadow: none;
	pointer-events: none;
	z-index: 2;
}

#taskTableToolbar {
	overflow-x: auto;
}

#taskTableToolbar::-webkit-scrollbar {
	height: 6px;
}

#taskTableToolbar::-webkit-scrollbar-thumb {
	background: #ced4da;
	border-radius: 4px;
}

#aeOrderRecordsModal .modal-content {
	height: 70vh;
	display: flex;
	flex-direction: column;
}

#aeOrderRecordsModal .modal-body {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#aeOrderRecordToolbar {
	overflow-x: auto;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid #eef0f2;
	position: relative;
	z-index: 5;
	flex: 0 0 auto;
}

.control-ae-toolbar-left,
.control-ae-toolbar-right {
	min-height: 2rem;
}

.control-ae-filter-control {
	width: 150px;
	min-width: 150px;
}

.control-ae-filter-date-range {
	width: 180px;
	min-width: 180px;
}

.control-ae-filter-search {
	width: 200px;
	min-width: 200px;
}

#aeOrderRecordsModal .fixed-table-toolbar {
	margin-bottom: 0.5rem;
}

#aeOrderRecordsModal .fixed-table-toolbar #aeOrderRecordToolbar {
	margin-bottom: 0;
}

#aeOrderRecordsModal .fixed-table-container .table tbody td,
#aeOrderRecordsModal .fixed-table-container .table thead th {
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}

#aeOrderRecordsModal .fixed-table-pagination {
	border-top: 1px solid #eef0f2;
	padding-top: 0.5rem;
}

#aeOrderRecordsModal .flatpickr-calendar {
	z-index: 2000 !important;
}

#aeOrderRecordTableWrap,
#aeOrderRecordTable {
	width: 100%;
}

#aeOrderRecordsModal .bootstrap-table,
#aeOrderRecordsModal .fixed-table-container {
	width: 100%;
	position: relative;
	z-index: 1;
}

#aeOrderRecordsModal .bootstrap-table {
	flex: 1 1 auto;
	min-height: 0;
}

.control-ae-order-vars-preview {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
	max-width: 280px;
}

.control-ae-order-vars-code {
	max-height: 50vh;
	overflow: auto;
	text-align: left;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.875rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 0.5rem;
	padding: 0.75rem;
}

@media (max-width: 992px) {
	.control-ae-filter-control,
	.control-ae-filter-search {
		width: 100%;
		min-width: 0;
	}
}
