/* Modern UI Redesign */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-attachment: fixed;
    padding: 20px;
    color: #1e293b;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(38, 132, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

:root {
    --accent: #2684ff;
    --accent-hover: #0d6fe9;
    --accent-light: #4a9eff;
    --accent-ultralight: #e8f3ff;
    --danger: #de4b4b;
    --danger-hover: #c53c3c;
    --success: #22c55e;
    --success-hover: #16a34a;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --panel-bg: #ffffff;
    --panel-border: #e1e8f0;
    --panel-shadow: 0 4px 20px -8px rgba(30, 50, 80, .15), 0 2px 8px -2px rgba(30, 50, 80, .08);
    --card-shadow: 0 2px 16px -4px rgba(38, 132, 255, .12);
    --hover-shadow: 0 8px 32px -8px rgba(38, 132, 255, .20);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --inside-bg: #dbeafe;
    --inside-text: #1d4ed8;
    --outside-bg: #fef3c7;
    --outside-text: #d97706;
    --replacement-bg: #ede9fe;
    --replacement-text: #7c3aed;
    --status-active-bg: #dcfce7;
    --status-active-text: #166534;
    --status-unreach-bg: #fee2e2;
    --status-unreach-text: #dc2626;
    --badge-bg: #f1f5f9;
    --badge-text: #475569;
    --focus-ring: 0 0 0 3px rgba(38, 132, 255, .35);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --backdrop-blur: blur(12px);
}

h1 {
    margin: 20px 0 32px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-align: center;
    background: linear-gradient(135deg, #2684ff 0%, #0d6fe9 50%, #1a73e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    padding: 16px 0;
}

h1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2684ff, #0d6fe9);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(38, 132, 255, 0.3);
}

h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2684ff, transparent);
    border-radius: 1px;
}

.panel {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px 36px 36px;
    margin: 28px auto;
    max-width: 1120px;
    box-shadow: var(--panel-shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.panel:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: 
        radial-gradient(circle at 85% 15%, rgba(38, 132, 255, .08), transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

.panel h3 {
    margin: 28px 0 20px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #1e293b;
    position: relative;
    padding-left: 16px;
}

.panel h3::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    /* background: linear-gradient(135deg, var(--accent), var(--accent-light)); */
    border-radius: 2px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #eef2f7;
    border: 1px solid #d0d8e2;
    color: #2e3d4f;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: .4px;
    transition: .25s;
}

.tab-btn:hover {
    background: #e2e9f2;
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: #1c6ed8;
    box-shadow: 0 4px 12px -4px rgba(38, 132, 255, .45);
}

.tab-panel {
    animation: fade .28s ease;
}

button {
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .4px;
    transition: all .25s ease;
    margin: 3px;
    box-shadow: 0 2px 8px -2px rgba(38, 132, 255, .3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left .6s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 4px 16px -4px rgba(38, 132, 255, .4);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0px) scale(0.98);
}

button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

button.danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
    box-shadow: 0 2px 8px -2px rgba(222, 75, 75, .3);
}

button.danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, var(--danger) 100%);
    box-shadow: 0 4px 16px -4px rgba(222, 75, 75, .4);
    transform: translateY(-1px);
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

input[type=text],
select {
    /* width: 100%; */
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    transition: all .25s ease;
    margin: 6px 0;
    box-shadow: 0 1px 3px -1px rgba(0, 0, 0, .05);
    backdrop-filter: blur(4px);
}

input[type=text]:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring), 0 2px 8px -2px rgba(38, 132, 255, .15);
    outline: none;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

input[type=text]:hover,
select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px -1px rgba(0, 0, 0, .08);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16px;
    min-width: 640px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .6px;
    color: #334155;
    padding: 20px 22px;
    text-align: center;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid var(--accent-ultralight);
    text-transform: uppercase;
    font-size: 13px;
}

tbody td {
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 22px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    min-height: 64px;
    transition: all .2s ease;
}

tbody tr {
    transition: box-shadow .18s, transform .18s, background .28s;
}

tbody tr+tr td {
    border-top: 1px solid #eef2f6;
}

tbody tr:hover {
    box-shadow: 0 8px 24px -8px rgba(38, 132, 255, .2);
    transform: translateY(-2px);
}

tbody tr:hover td {
    background: rgba(248, 250, 252, 0.98);
}

.badge-outside,
.badge-inside,
.badge-replacement {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: .4px;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid;
    transition: all .2s ease;
    backdrop-filter: blur(4px);
}

.badge-outside {
    background: var(--outside-bg);
    color: var(--outside-text);
    border-color: var(--outside-text);
}

.badge-outside:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px -2px rgba(217, 119, 6, .3);
}

.badge-inside {
    background: var(--inside-bg);
    color: var(--inside-text);
    border-color: var(--inside-text);
}

.badge-inside:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px -2px rgba(29, 78, 216, .3);
}

.badge-replacement {
    background: var(--replacement-bg);
    color: var(--replacement-text);
    border-color: var(--replacement-text);
}

.badge-replacement:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px -2px rgba(124, 58, 237, .3);
}

.badge-replacement:before {
    content: "★";
    font-size: 12px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-text);
    transition: all .2s ease;
    backdrop-filter: blur(4px);
}

.status-tag:hover {
    transform: scale(1.05);
}

.status-tag:before {
    content: "";
}

.status-tag.active {
    background: var(--status-active-bg);
    color: var(--status-active-text);
}

.status-tag.unreachable {
    background: var(--status-unreach-bg);
    color: var(--status-unreach-text);
}


.phone-link,
.call-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.phone-link:hover,
.call-link:hover {
    text-decoration: underline;
}

.call-link {
    background: #eef5ff;
    padding: 3px 8px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1;
    display: none;
}

.call-link:hover {
    background: #d9ecff;
}

.phone-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.message {
    margin: 12px 0 18px;
    font-size: 16px;
    padding: 12px 16px;
    background: #eef5ff;
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    color: #0d447a;
    line-height: 1.5;
    display: none; /* 初始状态隐藏 */
}

.message.error {
    background: #ffe2d9;
    color: #a2352c;
    border-color: #ffb7a8;
}

.draw-actions,
.replacement-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* 让所有子元素水平中线对齐 */
    gap: 12px;
    margin-bottom: 20px;
}

.replacement-actions.hidden {
    display: none !important;
}

.replacement-actions {
    background: #f6f9fc;
    padding: 16px 20px;
    border: 1px solid #e2e9f1;
    border-radius: 14px;
    transition: background .25s, box-shadow .25s;
    margin-top: 24px; /* 增加美观的上边距 */
}

.replacement-actions.alert {
    background: linear-gradient(90deg, #fff4e0, #ffeccd);
    box-shadow: 0 0 0 1px #ffd9a3 inset;
}

.replacement-actions.alert #replacementBtn {
    background: #ffae42;
    border-color: #ff9811;
}

.replacement-actions.alert #replacementBtn:hover {
    background: #ff9811;
}

.replacement-actions .hint {
    font-size: 14px;
    line-height: 1.5;
    color: #5a6b7d;
    font-weight: 600; /* 加粗 */
    margin-top: 0; /* 移除上边距，让flex对齐生效 */
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafe 0%, #f1f7fd 100%);
    border: 1px solid #e8f0f8;
    border-radius: 16px;
    box-shadow: 0 2px 12px -4px rgba(38, 132, 255, 0.08);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.toolbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2684ff, #0d6fe9, #1a73e8);
    border-radius: 16px 16px 0 0;
}

.toolbar .hint {
    font-size: 14px;
    color: #5a6b7d;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid #e1e8f0;
    backdrop-filter: blur(8px);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    line-height: 1.4;
}

.toolbar .hint #expertCount {
    font-weight: 700;
    color: var(--accent);
    font-size: 15px;
}

.selected-table th:nth-child(4),
.selected-table td:nth-child(4) {
    min-width: 140px;
}

.selected-table td:nth-child(4) {
    text-align: center;
    vertical-align: middle;
}

.selected-table td:nth-child(4) > * {
    display: inline-block;
    margin: 2px;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.auth-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(38, 132, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    width: 100%;
    max-width: 400px;
    padding: 36px 40px 42px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .15), 0 4px 16px -4px rgba(38, 132, 255, .1);
    animation: scaleIn .5s ease;
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.auth-box h2 {
    margin: 0 0 12px;
    font-size: 24px;
    text-align: center;
    font-weight: 700;
}

.auth-tip {
    margin: 0 0 18px;
    font-size: 15px;
    color: #5a6b7d;
    text-align: center;
    line-height: 1.5;
}

.auth-box input[type=password] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    outline: none;
    transition: all .25s ease;
    background: rgba(255, 255, 255, 0.9);
    margin: 10px 0;
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .05);
}

.auth-box input[type=password]:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring), 0 4px 12px -4px rgba(38, 132, 255, .2);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.auth-msg {
    margin-top: 12px;
    min-height: 20px;
    font-size: 14px;
    text-align: center;
    color: #c62828;
}

.fade-in-initial {
    animation: fade .4s ease-out;
}

.slide-in-left {
    animation: slideInFromLeft .5s ease-out;
}

.slide-in-right {
    animation: slideInFromRight .5s ease-out;
}

.scale-in {
    animation: scaleIn .3s ease-out;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

tr.replace-flash {
    animation: replaceFlash 1s ease-in-out;
}

@keyframes replaceFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(123, 97, 255, 0);
        background: #f5f1ff;
    }

    40% {
        box-shadow: 0 0 0 4px rgba(123, 97, 255, .25);
        background: #ede6ff;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(123, 97, 255, 0);
    }
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@media (max-width:600px) {
    body {
        padding: 12px;
        background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    }

    h1 {
        font-size: 28px;
        margin: 16px 0 24px;
        letter-spacing: 1px;
        padding: 12px 0;
    }

    h1::before {
        width: 60px;
        height: 3px;
    }

    h1::after {
        width: 90px;
    }

    .panel {
        padding: 24px 20px 28px;
        margin: 16px auto;
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.95);
    }

    .tabs {
        gap: 10px;
        margin: 0 0 20px;
        padding: 4px;
        background: rgba(241, 245, 249, 0.8);
        border-radius: var(--radius-lg);
        backdrop-filter: blur(8px);
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: var(--radius-md);
        flex: 1;
        box-shadow: none;
    }

    .tab-btn.active {
        box-shadow: 0 2px 8px -2px rgba(38, 132, 255, .3);
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 18px 20px;
        margin-bottom: 20px;
        border-radius: var(--radius-lg);
        background: rgba(248, 250, 252, 0.9);
    }

    .toolbar button {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: var(--radius-md);
    }

    .toolbar .hint {
        margin-left: 0;
        align-self: center;
        text-align: center;
        font-size: 13px;
        padding: 6px 12px;
    }

    table {
        font-size: 15px;
        min-width: 0;
    }

    thead {
        display: none;
    }

    .call-link {
        display: inline-block;
    }

    .selected-table tr {
        display: grid;
        grid-template-columns: 1fr 110px;
        margin: 12px 0;
        border: 1px solid var(--panel-border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .12);
        overflow: hidden;
    }

    .selected-table tr td {
        border: none;
        padding: 8px 12px;
        background: transparent;
        font-size: 15px;
    }

    .selected-table tr td:nth-child(-n+4) {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .selected-table tr td:nth-child(1),
    .selected-table tr td:nth-child(2),
    .selected-table tr td:nth-child(3) {
        border-bottom: 1px solid #eef2f6;
    }

    .selected-table tr td:nth-child(1) {
        font-weight: 700;
        font-size: 17px;
    }

    .selected-table tr td:nth-child(2) {
        font-size: 15px;
        justify-content: space-between;
        align-items: center;
    }

    .selected-table tr td:nth-child(3) {
        justify-content: space-between;
        align-items: center;
    }

    .selected-table tr td:nth-child(4) {
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        white-space: normal;
    }

    .selected-table tr td:nth-child(5) {
        grid-column: 2;
        grid-row: 1 / span 4;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        justify-content: center;
        padding: 10px 10px;
        background: linear-gradient(180deg, #f8fbff, #f2f6fa);
        border-left: 1px solid #e6edf3;
    }

    .selected-table tr td:nth-child(5) button {
        font-size: 14px;
        padding: 6px 8px;
    }

    .selected-table tr td:nth-child(2)::before {
        content: "手机";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        font-weight: 600;
        flex-shrink: 0;
    }

    .selected-table tr td:nth-child(3)::before {
        content: "身份";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        font-weight: 600;
        flex-shrink: 0;
    }

    .selected-table tr td:nth-child(4)::before {
        content: "状态";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        font-weight: 600;
        flex-shrink: 0;
    }

    .selected-table tr td:nth-child(5)::before {
        content: "" !important;
    }

    /* 内容区域在剩余空间居中 */
    .selected-table tr td:nth-child(2) {
        text-align: left;
    }
    
    .selected-table tr td:nth-child(3) {
        justify-content: space-between;
        align-items: center;
    }
    
    .selected-table tr td:nth-child(4) {
        justify-content: space-between;
        align-items: center;
    }

    /* 确保内容在剩余空间中居中 */
    .selected-table tr td:nth-child(3) > span,
    .selected-table tr td:nth-child(4) > span {
        flex: 1;
        text-align: center;
        margin-left: 8px;
    }

    /* 手机号链接居中 */
    .selected-table tr td:nth-child(2) a.phone-link {
        text-align: center;
        flex: 1;
        margin-left: 8px;
    }

    .selected-table .badge-outside,
    .selected-table .badge-inside,
    .selected-table .badge-replacement,
    .selected-table .status-tag {
        font-size: 12px;
    }
}

@media (max-width:600px) {
    /* 专家维护页面移动端适配 */
    .experts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }

    /* 已抽取名单移动端适配 */
    .selected-experts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 12px;
    }

    .selected-expert-card {
        padding: 20px;
        border-radius: 20px;
    }

    .expert-card-header {
        margin-bottom: 20px;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        position: relative;
        text-align: center;
    }

    .expert-slot {
        position: absolute;
        top: -20px;
        left: -20px;
        background: linear-gradient(135deg, var(--accent), var(--accent-light));
        color: white;
        width: 32px;
        height: 32px;
        border-radius: 0 0 16px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 14px;
        box-shadow: 0 2px 8px -2px rgba(38, 132, 255, 0.4);
        border: 2px solid white;
    }

    .expert-name {
        font-size: 18px;
        text-align: center;
        width: 100%;
        margin-top: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .mobile-status-tags {
        display: flex !important;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .desktop-only {
        display: none !important;
    }

    .expert-details {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    /* 移动端已抽取名单卡片的联系电话和专家身份改为两行显示 */
    .selected-expert-card .detail-item:not(.desktop-only) {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .selected-expert-card .detail-label {
        min-width: auto;
        margin-bottom: 2px;
    }

    .selected-expert-card .detail-value {
        flex: none;
        align-self: flex-start;
    }

    .status-section {
        padding: 12px;
        margin-bottom: 20px;
    }

    .card-actions {
        gap: 8px;
    }

    .card-actions button {
        padding: 12px 16px;
        font-size: 15px;
        min-width: 0;
    }

    .phone-link {
        font-size: 15px;
        padding: 8px 12px;
    }

    .empty-selected-state {
        padding: 40px 16px;
    }

    .empty-selected-state .icon {
        font-size: 48px;
    }

    /* 约束规则移动端适配 */
    .constraints {
        padding: 16px 18px;
        margin: 12px 0 20px 0;
        border-radius: 12px;
        font-size: 14px;
    }

    .constraints::after {
        display: none;
    }

    .constraints strong {
        padding: 1px 6px;
        font-size: 13px;
        border-radius: 6px;
    }

    .constraints strong::before {
        font-size: 10px;
    }

    .expert-card {
        padding: 20px;
    }

    .expert-card-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .expert-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .expert-actions button {
        padding: 8px 12px;
        font-size: 13px;
    }

    .expert-form {
        gap: 14px;
    }

    .form-group input,
    .form-group select {
        font-size: 16px; /* 防止iOS缩放 */
    }

    .call-button {
        padding: 6px 10px;
        font-size: 12px;
        right: 6px;
    }

    /* 保持原表格样式作为备用 */
    .experts-table {
        min-width: 0;
        display: none; /* 隐藏原表格 */
    }

    .experts-table thead {
        display: none;
    }

    .experts-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 100px;
        margin: 12px 0;
        border: 1px solid var(--panel-border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .12);
        overflow: hidden;
        position: relative;
    }

    .experts-table tbody tr td {
        border: none;
        padding: 8px 12px;
        background: transparent;
        font-size: 15px;
    }

    .experts-table tbody tr td:first-child {
        position: absolute;
        top: 0;
        left: 0;
        padding: 5px 11px;
        background: var(--accent);
        color: #fff;
        font-weight: 700;
        font-size: 12px;
        border-radius: 0 0 10px 0;
    }

    .experts-table tbody tr td:nth-child(2) {
        padding-top: 32px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .experts-table tbody tr td:nth-child(3),
    .experts-table tbody tr td:nth-child(4) {
        display: flex;
        flex-direction: column;
        gap: 6px;
        border-top: 1px solid #eef2f6;
    }

    .experts-table tbody tr td:nth-child(2)::before {
        content: "姓名";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        align-self: flex-start;
        font-weight: 600;
    }

    .experts-table tbody tr td:nth-child(3)::before {
        content: "手机";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        font-weight: 600;
    }

    .experts-table tbody tr td:nth-child(4)::before {
        content: "身份";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        font-weight: 600;
    }

    .experts-table tbody tr td:nth-child(5) {
        grid-column: 2;
        grid-row: 1 / span 4;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 10px;
        background: linear-gradient(180deg, #f8fbff, #f2f6fa);
        border-left: 1px solid #e6edf3;
    }

    .experts-table tbody tr td:nth-child(5)::before {
        content: "操作";
        color: #667;
        font-size: 12px;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 14px;
        align-self: flex-start;
        font-weight: 600;
    }

    .experts-table tbody tr td:nth-child(5) button {
        font-size: 14px;
        padding: 6px 8px;
    }

    .experts-table tbody tr input[type=text],
    .experts-table tbody tr select {
        width: 100%;
        font-size: 15px;
    }

    .experts-table .empty-row {
        display: block;
        padding: 28px 0;
        font-size: 15px;
    }
}

/* 专家卡片布局 */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.expert-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.expert-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.expert-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--panel-border);
}

.expert-number {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px -2px rgba(38, 132, 255, 0.4);
}

.expert-actions {
    display: flex;
    gap: 8px;
}

.expert-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    margin: 0;
}

.expert-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--badge-text);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    margin: 0;
    font-size: 15px;
}

.phone-group {
    position: relative;
}

.call-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-ultralight);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 8px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.call-button:hover {
    background: var(--accent);
    color: white;
}

.expert-card.empty {
    border: 2px dashed var(--panel-border);
    background: rgba(248, 250, 252, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--badge-text);
    font-size: 16px;
    text-align: center;
}

.expert-card.empty::before {
    display: none;
}

/* 现代化已抽取名单卡片布局 */
.selected-experts-container {
    margin-top: 20px;
}

.selected-experts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.selected-expert-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.90) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 4px 20px -6px rgba(0, 0, 0, 0.12),
        0 2px 8px -2px rgba(38, 132, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.selected-expert-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 12px 32px -8px rgba(0, 0, 0, 0.15),
        0 4px 16px -4px rgba(38, 132, 255, 0.12);
    border-color: rgba(38, 132, 255, 0.2);
}

.selected-expert-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2684ff, #4a9eff, #6366f1);
    border-radius: 16px 16px 0 0;
}

.selected-expert-card::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(38, 132, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    transition: all 0.4s ease;
}

.selected-expert-card:hover::after {
    top: -30%;
    right: -30%;
    opacity: 1.5;
}

/* 现代化交互效果 */
.selected-expert-card {
    /* 移除默认动画，由JavaScript精确控制 */
    transition: opacity 0.3s ease;
}

.selected-expert-card.fade-in-initial {
    animation: slideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.selected-expert-card.replace-flash {
    animation: cardReplaceFlash 1.2s ease-in-out;
}

@keyframes cardReplaceFlash {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.12);
        border-color: rgba(255, 255, 255, 0.3);
    }
    25% {
        transform: scale(0.95);
        box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.3);
        border-color: rgba(124, 58, 237, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 48px -12px rgba(124, 58, 237, 0.25);
        border-color: rgba(124, 58, 237, 0.5);
    }
    75% {
        transform: scale(0.98);
        box-shadow: 0 12px 36px -8px rgba(124, 58, 237, 0.15);
        border-color: rgba(124, 58, 237, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.12);
        border-color: rgba(255, 255, 255, 0.3);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 优化的平滑状态更新动画 */
.selected-expert-card.status-update {
    animation: statusUpdate 0.3s ease-out;
}

@keyframes statusUpdate {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.03);
        box-shadow: 0 6px 24px -6px rgba(38, 132, 255, 0.25);
    }
    100% {
        transform: scale(1);
    }
}

/* 徽章悬停效果 */
.badge-outside:hover,
.badge-inside:hover,
.badge-replacement:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px -4px currentColor;
}

.status-tag:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px -4px currentColor;
}

/* 电话链接脉冲效果 */
@keyframes phonePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(38, 132, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(38, 132, 255, 0);
    }
}

.phone-link:hover {
    animation: phonePulse 1.5s infinite;
}

/* 确保所有标签和内容的垂直对齐 */
.detail-item .phone-link,
.detail-item .badge-outside,
.detail-item .badge-inside,
.detail-item .status-tag,
.detail-item .badge-replacement {
    margin: 0;
    vertical-align: middle;
}

/* 未提供电话号码的文本对齐 */
.detail-value span[style*="color: #94a3b8"] {
    display: inline-flex;
    align-items: center;
}

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

.expert-info {
    flex: 1;
    min-width: 0;
}

.expert-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

/* 桌面端隐藏移动端状态标签 */
.mobile-status-tags {
    display: none;
}

.desktop-only {
    display: block;
}

.expert-slot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-ultralight), rgba(241, 245, 249, 0.8));
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(38, 132, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expert-slot::before {
    content: "#";
    font-weight: 800;
}

.expert-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center; /* 水平中线对齐 */
    gap: 12px;
    justify-content: flex-start;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    min-width: 64px; /* 固定标签宽度 */
    flex-shrink: 0; /* 防止标签被压缩 */
}

.detail-value {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    font-weight: 500;
    color: #1e293b;
    flex: 1; /* 占用剩余空间 */
}

.phone-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    background: var(--accent-ultralight);
    border-radius: 12px;
    border: 1px solid rgba(38, 132, 255, 0.2);
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
}

.phone-link:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

.status-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(248, 250, 252, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.status-section .detail-label {
    margin-bottom: 8px;
}

.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.card-actions button {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.card-actions button:hover {
    transform: translateY(-1px);
}

.empty-selected-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: rgba(248, 250, 252, 0.8);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
}

.empty-selected-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-selected-state .title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.empty-selected-state .description {
    font-size: 14px;
    opacity: 0.8;
}

/* 约束规则美化 */
.constraints {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 20px 24px;
    margin: 16px 0 24px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.constraints::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #eab308, #facc15);
    border-radius: 16px 16px 0 0;
}

.constraints::after {
    content: "📋";
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 24px;
    opacity: 0.6;
    pointer-events: none;
}

.constraints:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.12);
    border-color: #94a3b8;
}

.constraints strong {
    color: #f59e0b;
    font-weight: 700;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid #f3d36b;
    box-shadow: 0 1px 3px -1px rgba(245, 158, 11, 0.2);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.constraints strong::before {
    content: "🎯";
    font-size: 12px;
}

.constraints strong:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.3);
}

footer {
    margin-top: 50px;
    text-align: center;
    color: #66788a;
    font-size: 14px;
    line-height: 1.5;
}

.empty-row {
    color: #9aa8b5;
    text-align: center;
    font-size: 16px;
}

.hidden {
    display: none !important;
}

/* ========== 调试模式样式 ========== */

/* 调试模式指示器 */
.debug-indicator {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 0 auto 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    max-width: 600px;
    box-shadow: 0 4px 16px -4px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
    animation: debugPulse 3s ease-in-out infinite;
}

.debug-indicator::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: debugSweep 2s ease-in-out infinite;
}

.debug-info {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
    font-weight: 400;
}

@keyframes debugPulse {
    0%, 100% {
        box-shadow: 0 4px 16px -4px rgba(124, 58, 237, 0.3);
    }
    50% {
        box-shadow: 0 8px 24px -6px rgba(124, 58, 237, 0.4);
    }
}

@keyframes debugSweep {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* 调试按钮容器 */
.debug-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid #c4b5fd;
    border-radius: 12px;
    box-shadow: 0 2px 8px -2px rgba(124, 58, 237, 0.15);
    position: relative;
    overflow: hidden;
}

.debug-buttons::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    border-radius: 12px 12px 0 0;
}

.debug-buttons::after {
    content: "🔧";
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 16px;
    opacity: 0.6;
    pointer-events: none;
}

/* 调试按钮样式 */
button.debug {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: white;
    border: 1px solid #6d28d9;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px -2px rgba(124, 58, 237, 0.3);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

button.debug::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

button.debug:hover::before {
    left: 100%;
}

button.debug:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px -4px rgba(124, 58, 237, 0.4);
    border-color: #5b21b6;
}

button.debug:active {
    transform: translateY(0) scale(0.98);
}

/* 特定按钮图标 */
button.debug#loadSeedBtn::after {
    content: " 🌱";
    margin-left: 4px;
}

button.debug#generateRandomBtn::after {
    content: " 🎲";
    margin-left: 4px;
}

button.debug#debugModeToggle::after {
    content: " 🔒";
    margin-left: 4px;
}

/* 调试模式下的额外样式 */
.debug-mode .panel {
    border: 2px solid rgba(124, 58, 237, 0.1);
    box-shadow: 
        var(--panel-shadow),
        0 0 0 1px rgba(124, 58, 237, 0.05);
}

.debug-mode .panel::before {
    background: 
        radial-gradient(circle at 85% 15%, rgba(124, 58, 237, .08), transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
}

/* 成功消息特殊样式（用于种子数据加载反馈） */
.message.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-color: #22c55e;
    border-left-width: 4px;
    box-shadow: 0 2px 12px -4px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
}

.message.success::before {
    content: "✅";
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 16px;
    opacity: 0.7;
}

/* 移动端调试模式入口 */
.main-title {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
    transition: all 0.3s ease;
}

.main-title.debug-activating {
    animation: titleShake 0.5s ease-in-out;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titleShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* 调试模式激活进度指示器 */
.debug-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10000;
    text-align: center;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(124, 58, 237, 0.5);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.3);
    animation: debugProgressPulse 1s ease-in-out infinite;
    min-width: 250px;
}

.debug-progress .progress-text {
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.9;
}

.debug-progress .progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.debug-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.6);
}

.debug-progress .progress-count {
    font-size: 18px;
    color: #a855f7;
    font-weight: 700;
}

@keyframes debugProgressPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.02); }
}

/* 移动端调试退出按钮 */
.mobile-debug-exit {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px -4px rgba(239, 68, 68, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    animation: mobileExitBounce 2s ease-in-out infinite;
}

.mobile-debug-exit:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px -6px rgba(239, 68, 68, 0.5);
}

.mobile-debug-exit.show {
    display: block;
}

.mobile-debug-exit::before {
    content: "🚪 ";
    margin-right: 4px;
}

@keyframes mobileExitBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 响应式调试样式 */
@media (max-width: 600px) {
    .debug-indicator {
        margin: 0 auto 16px;
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 10px;
    }

    .debug-info {
        font-size: 11px;
        margin-top: 3px;
    }

    .debug-buttons {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
        margin: 8px 0;
    }

    .debug-buttons button {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        justify-content: center;
    }

    .debug-buttons::after {
        top: 6px;
        right: 10px;
        font-size: 14px;
    }

    .debug-progress {
        padding: 16px 24px;
        font-size: 15px;
        min-width: 220px;
        border-radius: 12px;
    }

    .debug-progress .progress-text {
        font-size: 13px;
    }

    .debug-progress .progress-count {
        font-size: 16px;
    }

    .mobile-debug-exit {
        bottom: 16px;
        right: 16px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ========== 帮助页面样式 ========== */

/* 帮助页面容器 */
.help-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.help-section {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.help-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.15);
}

.help-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 快速开始步骤 */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.help-step:hover {
    background: rgba(241, 245, 249, 0.9);
    transform: translateX(4px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px -2px rgba(38, 132, 255, 0.3);
}

.step-content h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.step-content p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* 功能卡片 */
.help-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px -8px rgba(38, 132, 255, 0.2);
    border-color: rgba(38, 132, 255, 0.3);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.feature-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.feature-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-content li {
    padding: 4px 0;
    font-size: 14px;
    color: #64748b;
    position: relative;
    padding-left: 16px;
}

.feature-content li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 使用技巧卡片 */
.help-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f3d36b;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.tip-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px -4px rgba(245, 158, 11, 0.3);
}

.tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.tip-content h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.tip-content p {
    margin: 0;
    font-size: 13px;
    color: #a16207;
    line-height: 1.4;
}

/* 注意事项卡片 */
.help-warnings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.warning-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #f87171;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.warning-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px -4px rgba(239, 68, 68, 0.3);
}

.warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-content h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
}

.warning-content p {
    margin: 0;
    font-size: 13px;
    color: #dc2626;
    line-height: 1.4;
}

/* 操作流程 */
.help-workflow {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.workflow-step:hover {
    background: rgba(241, 245, 249, 0.9);
    transform: translateX(8px);
}

.workflow-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.workflow-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.workflow-arrow {
    font-size: 16px;
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

.workflow-step:last-child .workflow-arrow {
    display: none;
}

/* 技术支持卡片 */
.help-support {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.support-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
    border: 1px solid #4fc3f7;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.support-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px -4px rgba(3, 169, 244, 0.3);
}

.support-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.support-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0277bd;
}

.support-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #0288d1;
    line-height: 1.4;
}

.support-content p:last-child {
    margin-bottom: 0;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .help-container {
        padding: 0;
    }

    .help-section {
        padding: 20px 16px;
        margin-bottom: 24px;
        border-radius: var(--radius-md);
    }

    .help-section h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .help-features,
    .help-tips,
    .help-warnings,
    .help-support {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .help-step {
        padding: 12px;
        gap: 12px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-content h4 {
        font-size: 15px;
    }

    .step-content p {
        font-size: 13px;
    }

    .feature-card,
    .tip-card,
    .warning-card,
    .support-card {
        padding: 16px;
    }

    .feature-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .tip-icon,
    .warning-icon {
        font-size: 20px;
    }

    .support-icon {
        font-size: 24px;
    }

    .workflow-step {
        padding: 10px 12px;
        gap: 12px;
    }

    .workflow-icon {
        font-size: 18px;
    }

    .workflow-content {
        font-size: 13px;
    }

    .workflow-arrow {
        font-size: 14px;
    }

    /* 移动端流程布局优化 */
    .help-workflow {
        gap: 6px;
    }

    .workflow-step:hover {
        transform: none; /* 移动端不使用横向移动效果 */
    }

    .help-step:hover {
        transform: none; /* 移动端不使用横向移动效果 */
    }
}

/* 平板端适配 */
@media (min-width: 601px) and (max-width: 1024px) {
    .help-features,
    .help-support {
        grid-template-columns: repeat(2, 1fr);
    }

    .help-tips,
    .help-warnings {
        grid-template-columns: 1fr;
    }
}

/* 抽取规则配置样式 */
.draw-config {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.draw-config h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.draw-config h3::before {
    content: "⚙️";
    font-size: 16px;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.config-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.config-group label {
    font-weight: 500;
    color: #374151;
    min-width: auto;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.config-group input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.config-group input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.config-group select {
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    flex-shrink: 0;
}

.config-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.config-group .unit {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.config-actions button {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-actions button.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.config-actions button.secondary:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

/* 联系状态切换按钮样式 */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-button {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.status-button.reachable {
    background: var(--status-active-bg);
    color: var(--status-active-text);
    border: 1px solid #bbf7d0;
}

.status-button.reachable:hover {
    background: #bbf7d0;
    transform: translateY(-1px);
}

.status-button.unreachable {
    background: var(--status-unreach-bg);
    color: var(--status-unreach-text);
    border: 1px solid #fecaca;
}

.status-button.unreachable:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* 专家卡片无法联系状态样式 */
.expert-form.unreachable {
    opacity: 0.7;
    background: rgba(254, 226, 226, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px;
    margin: -8px;
}

.unreachable-indicator {
    color: var(--status-unreach-text);
    font-size: 14px;
    margin-left: 4px;
    animation: pulse 2s infinite;
}

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

/* 当前规则显示样式 */
#currentRule {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #0284c7;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    font-weight: 500;
    color: #0c4a6e;
    position: relative;
    overflow: hidden;
}

#currentRule::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0284c7, #0ea5e9);
}

#ruleDisplay {
    font-weight: 600;
    color: #0c4a6e;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .draw-config {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    /* 移动端隐藏齿轮图标 */
    .draw-config h3::before {
        display: none;
    }
    
    .config-group {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .config-group label {
        min-width: auto;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px;
    }
    
    .config-group input[type="number"] {
        width: 45px;
        padding: 4px 6px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .config-group select {
        min-width: 50px;
        padding: 4px 6px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .config-group .unit {
        flex-shrink: 0;
        font-size: 13px;
    }
    
    .config-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .config-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .status-button {
        width: 100%;
    }
    
    #currentRule {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* 专家统计样式 */
.expert-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
}

.stat-label {
    color: #64748b;
}

.stat-value {
    font-weight: 700;
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

.stat-value.inside {
    color: var(--inside-text);
}

.stat-value.outside {
    color: var(--outside-text);
}

.stat-value.reachable {
    color: var(--status-active-text);
}

.stat-value.available {
    color: #059669;
}

.stat-unit {
    color: #64748b;
    font-size: 13px;
}

/* 专家库统计样式 */
.expert-pool-stats {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.expert-pool-stats h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expert-pool-stats h4::before {
    content: "📊";
    font-size: 14px;
}

.pool-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.pool-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.pool-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pool-stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

.pool-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.pool-stat-value.inside {
    color: var(--inside-text);
}

.pool-stat-value.outside {
    color: var(--outside-text);
}

.pool-stat-value.available {
    color: #059669;
}

.pool-stat-unit {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .expert-stats {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
        align-items: stretch;
    }
    
    .stat-item {
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    .expert-pool-stats {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .pool-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pool-stat-item {
        padding: 10px;
    }
    
    .pool-stat-value {
        font-size: 20px;
    }
}

/* 平板端适配 */
@media (min-width: 601px) and (max-width: 1024px) {
    .expert-stats {
        justify-content: space-around;
    }
    
    .pool-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-group {
        justify-content: flex-start;
    }
    
    .config-actions {
        justify-content: flex-start;
    }
}

/* 自定义弹窗样式 */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    min-width: 300px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.custom-alert.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.custom-alert.success {
    border-left: 4px solid var(--success);
}

.custom-alert.error {
    border-left: 4px solid var(--danger);
}

.custom-alert.info {
    border-left: 4px solid var(--accent);
}

.alert-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    position: relative;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.5;
    margin-right: 20px;
}

.alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.alert-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .custom-alert {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .alert-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .alert-icon {
        font-size: 18px;
    }
    
    .alert-message {
        font-size: 13px;
        margin-right: 16px;
    }
    
    .alert-close {
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
}

/* End modern UI */