/*
 * Copyright (c) 2026 iCerya (icerya.com). All Rights Reserved.
 *
 * Released under the MIT License.
 * See LICENSE file in the project root for full license text.
 *
 * @package   MT-Linker
 * @author    iCerya
 * @link      https://icerya.com
 *
 * MT-Linker — 主 UI 样式
 * ====================================
 */

iconify-icon {
    vertical-align: -0.125em;
}

.mt-linker-page-wrapper {
    margin-top: calc(var(--nav-height, 0px) + 60px);
    margin-bottom: 60px;
}

/* ================================================================
   Hero Section — 页面头部
   ================================================================ */

.mtl-hero {
    margin-bottom: 60px;
    text-align: center;
}

.mtl-title {
    font-size: 48px;
    font-weight: 900;
    margin: 0 0 20px 0;
    letter-spacing: -0.04em;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.mtl-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
    margin: 0 0 40px 0;
}

/* ================================================================
   Stats Section — 统计信息模块化看板
   ================================================================ */

.mtl-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto 60px;
}

.mtl-stat-card {
    background: var(--card-bg, rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mtl-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.mtl-check-card {
    gap: 12px;
}

.mtl-stat-number {
    font-size: 36px;
    font-weight: 800;
    font-family: "SF Mono", monospace;
    color: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
    margin-bottom: 8px;
}

.mtl-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtl-check-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mtl-check-button:hover:not(:disabled) {
    transform: translateY(-2px);
    opacity: 0.85;
}

.mtl-check-button:disabled {
    background: rgba(128, 128, 128, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

.mtl-check-cooldown {
    font-size: 12px;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
}

/* ================================================================
   Section Headers — 分类标题
   ================================================================ */

.mtl-section {
    margin-bottom: 60px;
}

.mtl-section-title {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin: 40px 0 12px 0;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.mtl-section-desc {
    font-size: 15px;
    text-align: center;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
    margin: 0 0 30px 0;
}

.mtl-section-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0 12px 0;
    padding-left: 8px;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-65));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================
   Link Cards Grid — 链接卡片网格
   ================================================================ */

.mtl-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .mtl-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (min-width: 1200px) {
    .mtl-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================================================
   Link Card — 单个链接卡片
   ================================================================
   设计规则：
   - 背景不包含颜色渐变，颜色仅出现在 hover 时的边框
   - 右侧 50% 区域为 icon 图片背景，带淡化遮罩（左0%→右60%不透明度）
   - 标题、描述、Ping 位于左侧 50% 区域
   ================================================================ */

.mtl-card {
    --card-accent: 128 128 128 / 0.4;
    background: var(--card-bg, rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);
    border-radius: 24px;
    padding: 20px;
    min-height: 160px;
    min-width: 320px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

/* Icon 图片背景：占据右侧 50%，带淡化遮罩 */
.mtl-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    background: var(--mtl-icon-url) center/cover no-repeat;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
    filter: saturate(0.6);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-color-mode="dark"] .mtl-card::after {
    opacity: 0.19;
}

.mtl-card:hover::after {
    opacity: 1;
    filter: saturate(1);
}

/* 离线卡片：通信失联 / 注销星域 — 饱和度恒为 0，不可点击 */
.mtl-card.status-offline::after {
    filter: saturate(0);
}
.mtl-card.status-offline {
    pointer-events: none;
    cursor: default;
}
.mtl-card.status-offline:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(var(--adt-colorBoard-Label) / 0.13);
}
.mtl-card.status-offline:hover::after {
    opacity: 0.25;
    filter: saturate(0);
}
[data-color-mode="dark"] .mtl-card.status-offline:hover::after {
    opacity: 0.19;
}

.mtl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: rgb(var(--mtl-color-args, 128 128 128 / 0.6));
}

.mtl-card:active {
    transform: translateY(-2px);
}

.mtl-card-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.mtl-card-info {
    flex: 1;
    min-width: 0;
    max-width: 50%;
}

.mtl-card-name {
    font-size: 21px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mtl-card-des {
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    color: rgba(var(--adt-colorBoard-Label) / 0.501961);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mtl-card-ping {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
    position: relative;
    z-index: 1;
}

.mtl-card-divider {
    width: 100%;
    height: 1px;
    border-top: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);
    margin: auto 0 12px 0;
    position: relative;
    z-index: 1;
}

.mtl-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.mtl-card-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

.mtl-status-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
}

.mtl-status-text.status-ok {
    color: rgba(var(--adt-colorBoard-Green) / var(--adt-colorAlpha-100));
}

.mtl-status-text.status-error {
    color: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
}

/* Ping 状态点 */
.mtl-ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.mtl-ping-dot.status-ok {
    background: rgba(var(--adt-colorBoard-Green) / var(--adt-colorAlpha-100));
}

.mtl-ping-dot.status-error {
    background: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
}

.mtl-ping-dot.status-checking {
    background: rgba(var(--adt-colorBoard-Yellow) / var(--adt-colorAlpha-100));
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.mtl-card-timestamp {
    font-size: 12px;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
}

/* ================================================================
   Dashboard — 仪表板样式
   ================================================================ */

.mtl-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.mtl-table-container {
    background: var(--card-bg, rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 32px;
    overflow-x: auto;
    min-width: 0;
}

.mtl-table-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.mtl-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    background: transparent;
    table-layout: auto;
}

.mtl-table thead {
    border-bottom: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);
}

.mtl-table th {
    text-align: left;
    padding: 12px 8px;
    font-weight: 600;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-85));
}

.mtl-table td {
    padding: 12px 8px;
    border-bottom: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.07);
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    white-space: nowrap;
}

.mtl-table td.mtl-readonly,
.mtl-table td.mtl-editable {
    max-width: none;
}

.mtl-table tbody tr:hover {
    background: rgba(var(--adt-colorBoard-Label) / 0.03);
}

.mtl-table tbody tr.editing {
    background: rgba(var(--adt-colorBoard-Yellow) / 0.08) !important;
}

.mtl-table input,
.mtl-table select,
.mtl-table textarea {
    width: auto;
    max-width: none;
    min-width: 80px;
    padding: 6px 10px;
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: transparent;
    color: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    white-space: nowrap;
}

.mtl-table select {
    width: auto;
    min-width: 120px;
}

.mtl-table input[type="text"],
.mtl-table input[type="url"],
.mtl-table input[type="number"],
.mtl-table select {
    height: 34px;
    border-radius: 8px;
}

.mtl-table textarea {
    resize: vertical;
    min-height: 34px;
    min-width: 200px;
    white-space: pre-wrap;
}

.mtl-table input[type="text"],
.mtl-table input[type="url"] {
    min-width: 100px;
}

/* 屏蔽 number 输入框的步进器 */
.mtl-table input[type="number"]::-webkit-inner-spin-button,
.mtl-table input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mtl-table input[type="number"] {
    -moz-appearance: textfield;
}

.mtl-table input:focus,
.mtl-table select:focus,
.mtl-table textarea:focus {
    outline: none;
    border-color: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
}

.mtl-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mtl-btn-primary {
    background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
}

.mtl-btn-primary:hover {
    opacity: 0.85;
}

.mtl-btn-danger {
    background: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
    color: white;
}

.mtl-btn-danger:hover {
    background: rgba(var(--adt-colorBoard-Red) / 0.85);
}

.mtl-btn-secondary {
    background: rgba(128, 128, 128, 0.2);
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-85));
}

.mtl-btn-secondary:hover {
    background: rgba(128, 128, 128, 0.3);
}

/* ================================================================
   Apply Form — 申请表单
   ================================================================ */

.mtl-apply-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 1024px) {
    .mtl-apply-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .mtl-apply-preview {
        order: -1;
    }
}

.mtl-apply-form {
    max-width: 540px;
    width: 100%;
    justify-self: center;
    padding: 32px;
}

@media (max-width: 768px) {
    .mtl-apply-form {
        padding: 24px;
    }
}

.mtl-apply-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    /* 取消 transform，改用 calc 计算：视窗 50% 减去卡片约一半的高度 */
    top: calc(50vh - 100px);
    min-width: 320px;
}

@media (max-width: 1024px) {
    .mtl-apply-preview {
        position: static;
        min-height: 300px;
    }
}

.mtl-form-group {
    margin-bottom: 24px;
}

.mtl-form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.mtl-form-input,
.mtl-form-textarea,
.mtl-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.2);
    border-radius: 12px;
    font-size: 15px;
    background: transparent;
    color: inherit;
    transition: all 0.2s;
}

.mtl-form-select {
    height: 43px;
}

.mtl-form-input:focus,
.mtl-form-textarea:focus,
.mtl-form-select:focus {
    outline: none;
    border-color: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
    border-width: 1px;
}

.mtl-form-input.error {
    border-color: rgba(var(--adt-colorBoard-Error) / var(--adt-colorAlpha-100));
    border-width: 1px;
}

.mtl-form-input.warning {
    border-color: rgba(var(--adt-colorBoard-Warning) / var(--adt-colorAlpha-100));
    border-width: 1px;
}

.mtl-form-textarea.error {
    border-color: rgba(var(--adt-colorBoard-Error) / var(--adt-colorAlpha-100));
    border-width: 1px;
}

.mtl-form-textarea.warning {
    border-color: rgba(var(--adt-colorBoard-Warning) / var(--adt-colorAlpha-100));
    border-width: 1px;
}

.mtl-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.mtl-input-row .mtl-form-input {
    flex: 1;
}

.mtl-color-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mtl-color-row .mtl-form-input {
    flex: 1;
    min-width: 0;
}

.mtl-color-sep {
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
    font-weight: 600;
}

.mtl-form-hint {
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
    min-height: 20px;
    color: rgba(var(--adt-colorBoard-Label) / 0.5);
}

.mtl-form-hint.error {
    color: rgba(var(--adt-colorBoard-Error) / var(--adt-colorAlpha-100));
}

.mtl-form-hint.warning {
    color: rgba(var(--adt-colorBoard-Warning) / var(--adt-colorAlpha-100));
}

/* 屏蔽表单 number 输入框的步进器 */
.mtl-color-row .mtl-form-input[type="number"]::-webkit-inner-spin-button,
.mtl-color-row .mtl-form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.mtl-color-row .mtl-form-input[type="number"] {
    -moz-appearance: textfield;
}

.mtl-ping-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    height: 44px;
    background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mtl-ping-button:hover:not(:disabled) {
    opacity: 0.85;
}

.mtl-ping-button:disabled {
    background: rgba(128, 128, 128, 0.3);
    cursor: not-allowed;
}

.mtl-ping-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
}

.mtl-ping-result.checking {
    color: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
    background: rgba(var(--adt-colorBoard-Blue) / 0.1);
}

.mtl-ping-result.success {
    color: rgba(var(--adt-colorBoard-Green) / var(--adt-colorAlpha-100));
    background: rgba(var(--adt-colorBoard-Green) / 0.1);
}

.mtl-ping-result.error {
    color: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
    background: rgba(var(--adt-colorBoard-Red) / 0.1);
}

.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mtl-form-submit {
    width: 100%;
    padding: 14px 24px;
    background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mtl-form-submit:hover:not(:disabled) {
    opacity: 0.85;
    transform: translateY(-2px);
}

.mtl-form-submit:disabled {
    background: rgba(128, 128, 128, 0.6);
    cursor: not-allowed;
}

.mtl-success-message {
    text-align: center;
    padding: 60px 20px;
}

.mtl-success-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: rgba(var(--adt-colorBoard-Green) / var(--adt-colorAlpha-100));
}

.mtl-success-button {
    display: inline-block;
    padding: 12px 32px;
    background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.mtl-success-button:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.mtl-error-banner {
    text-align: center;
    padding: 40px 20px;
    background: rgba(var(--adt-colorBoard-Red) / 0.1);
    border: 0.5px solid rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
    border-radius: 16px;
    color: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
    font-size: 14px;
    margin: 40px 0;
}

.mtl-error-banner a {
    color: inherit;
    font-weight: 600;
}

/* ================================================================
   WordPress / Blocksy 主题兼容层
   ================================================================ */

/* ================================================================
   Dashboard — 仪表板专属样式
   ================================================================ */

.mtl-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.mtl-add-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(var(--adt-colorBoard-Blue) / 0.9) 0%, rgba(var(--adt-colorBoard-Blue) / 0.7) 100%);
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(var(--adt-colorBoard-Blue) / 0.2);
}

.mtl-add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--adt-colorBoard-Blue) / 0.3);
}

.mtl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px;
}

.mtl-page-info {
    font-size: 14px;
    font-weight: 600;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-65));
}

.mtl-message {
    padding: 16px;
    margin-bottom: 24px;
    background: rgba(var(--adt-colorBoard-Green) / 0.1);
    border-left: 4px solid rgba(var(--adt-colorBoard-Green) / var(--adt-colorAlpha-100));
    border-radius: 8px;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.mtl-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.2);
}

.mtl-color-inputs-inline {
    display: flex;
    gap: 4px;
    align-items: center;
}

.mtl-actions {
    white-space: nowrap;
}

.mtl-actions .mtl-btn {
    margin-right: 8px;
}

.mtl-actions .mtl-btn:last-child {
    margin-right: 0;
}

.mtl-btn-edit {
    background: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
}

.mtl-btn-delete {
    background: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
    color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
}

.mtl-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mtl-modal.show {
    display: flex;
}

.mtl-modal-content {
    background: rgba(var(--adt-colorBoard-Background) / 1);
    padding: 0;
    border-radius: 16px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mtl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 0.5px solid rgba(var(--adt-colorBoard-Label) / 0.13);

    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(var(--adt-colorBoard-Background) / 0.65);
    backdrop-filter: blur(23px) saturate(180%);
    -webkit-backdrop-filter: blur(23px) saturate(180%);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.mtl-modal-header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 600;
}

.mtl-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(var(--adt-colorBoard-Label) / 0.1);
    border-radius: 8px;
    font-size: 24px;
    line-height: normal;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-65));
    display: flex;
    align-items: center;
    justify-content: center;
}

.mtl-modal-close:hover {
    background: rgba(var(--adt-colorBoard-Red) / 0.1);
    color: rgba(var(--adt-colorBoard-Red) / var(--adt-colorAlpha-100));
}

/* ================================================================
   Dashboard Table — 右侧列固定与防透视穿帮
   ================================================================ */

.mtl-table th:last-child,
.mtl-table td:last-child {
    position: sticky;
    right: 0;
    background: rgba(var(--adt-colorBoard-Background) / 1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.mtl-table th:last-child {
    z-index: 11;
}

/* 悬停行的固定列需要继承背景 */
.mtl-table tbody tr:hover td:last-child {
    background: rgba(var(--adt-colorBoard-Label) / 0.03);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* 编辑状态行的固定列需要继承黄色背景 */
.mtl-table tbody tr.editing td:last-child {
    background: rgba(var(--adt-colorBoard-Yellow) / 0.08) !important;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* 默认状态的固定列使用主背景色 */
.mtl-table tbody tr:not(.editing):not(:hover) td:last-child {
    background: rgba(var(--adt-colorBoard-Background) / 1);
}
