:root {
    --primary: #4F6BF6;
    --primary-light: #EEF1FE;
    --secondary: #6B7280;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F5F7FA;
    --card: #fff;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --sidebar-bg: #1E293B;
    --sidebar-text: #94A3B8;
    --sidebar-active: #4F6BF6;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ===== Login ===== */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: var(--card);
    border-radius: 16px;
    padding: 40px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--sidebar-active);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: 14px;
    position: relative;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.nav-link .badge {
    position: absolute;
    right: 12px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 14px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sidebar-footer .name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.sidebar-footer .role {
    color: var(--sidebar-text);
    font-size: 11px;
}

/* ===== Main ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    height: 60px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    flex-shrink: 0;
}

.topbar h2 {
    font-size: 18px;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background .2s;
}

.topbar-icon:hover {
    background: var(--bg);
}

.topbar-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.notify-panel {
    position: absolute;
    top: 60px;
    right: 28px;
    width: 360px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 100;
    display: none;
}

.notify-panel.active {
    display: block;
}

.notify-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}

.notify-item:hover {
    background: var(--bg);
}

.notify-item.unread {
    background: #F0F5FF;
}

.notify-item.unread:hover {
    background: #E8EEFF;
}

.dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* ===== Stats ===== */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    position: relative;
}

.stats-row::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 200px;
}

.sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.sc-icon svg {
    width: 24px;
    height: 24px;
}

.sc-val {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sc-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.sc-change {
    font-size: 11px;
    margin-top: 4px;
}

.sc-change.up {
    color: var(--success);
}

.sc-change.down {
    color: var(--danger);
}

/* ===== Grid ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ===== Card ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
}

.card-action {
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
}

.card-action:hover {
    text-decoration: underline;
}

/* ===== Recent List ===== */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.ri-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ri-text {
    flex: 1;
    color: var(--text);
    line-height: 1.5;
}

.ri-time {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    width: 260px;
    outline: none;
    transition: border .2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: #fff;
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .2s;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    opacity: .9;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    opacity: .9;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    opacity: .9;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-warning:hover {
    opacity: .9;
}

.btn-outline {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
}

/* ===== Table ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg);
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--primary-light);
}

/* ===== Status ===== */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.inactive {
    background: #F3F4F6;
    color: #6B7280;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-badge.processing {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.resolved {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.closed {
    background: #F3F4F6;
    color: #9CA3AF;
}

.status-badge.error {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge.bound {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.unbound {
    background: #F3F4F6;
    color: #6B7280;
}

.status-badge.online {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.offline {
    background: #F3F4F6;
    color: #6B7280;
}

.status-badge.warning {
    background: #FEF3C7;
    color: #92400E;
}

/* ===== Action ===== */
.action-link {
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 2px;
    display: inline-block;
}

.action-link:hover {
    text-decoration: underline;
}

.action-link.danger {
    color: var(--danger);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 16px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    transition: all .2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: 16px;
    width: 480px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    transition: background .2s;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 0 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== Form ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border .2s;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== Push Card ===== */
.push-card {
    background: var(--bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.push-card .push-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.push-card .push-body {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.push-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.push-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.push-stats .num {
    font-weight: 700;
    color: var(--text);
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== Batch Tag ===== */
.batch-tag {
    font-family: monospace;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== Chart ===== */
.chart-container {
    position: relative;
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 0;
}

.chart-bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    position: relative;
    min-width: 20px;
    transition: all .3s;
    cursor: pointer;
}

.chart-bar:hover {
    opacity: .85;
}

.chart-bar .bar-val {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.chart-bar .bar-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chart-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-secondary);
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* ===== Settings ===== */
.setting-section {
    margin-bottom: 24px;
}

.setting-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
}

.setting-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.setting-input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    width: 280px;
    outline: none;
}

.setting-input:focus {
    border-color: var(--primary);
}

.toggle {
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ===== API Docs ===== */
.api-group {
    margin-bottom: 24px;
}

.api-group-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-group-title .api-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.api-badge.get {
    background: #D1FAE5;
    color: #065F46;
}

.api-badge.post {
    background: #DBEAFE;
    color: #1E40AF;
}

.api-badge.put {
    background: #FEF3C7;
    color: #92400E;
}

.api-badge.delete {
    background: #FEE2E2;
    color: #991B1B;
}

.api-badge.hub {
    background: #EDE9FE;
    color: #5B21B6;
}

.api-badge.event {
    background: #FCE7F3;
    color: #9D174D;
}

.api-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.api-card.signalr {
    border-left-color: #8B5CF6;
}

.api-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.api-path {
    font-family: monospace;
    font-size: 13px;
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
}

.api-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
}

.api-params {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 12px;
}

.api-params th {
    background: var(--bg);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

.api-params td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
}

.api-params code {
    font-family: monospace;
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--primary);
}

.api-response {
    background: #1E293B;
    color: #E2E8F0;
    border-radius: 8px;
    padding: 14px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.doc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.doc-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}

.doc-tab:hover {
    color: var(--text);
}

.doc-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.doc-content {
    display: none;
}

.doc-content.active {
    display: block;
}

.api-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.api-summary-card {
    background: var(--card);
    border-radius: 10px;
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.api-summary-card .num {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.api-summary-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Utility ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--text-secondary);
}

.font-mono {
    font-family: monospace;
}

.fw-bold {
    font-weight: 700;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-16 {
    margin-top: 16px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 隐藏 InputFile 原生控件 */
.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ===== User Selector (用户搜索选择器) ===== */
.user-selector-wrapper {
    width: 100%;
}

.user-selector {
    position: relative;
    width: 100%;
    max-width: 600px;
    outline: none;
}

.user-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.user-search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 1;
}

.user-search-input {
    padding-left: 38px !important;
    padding-right: 30px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.searching-spinner {
    position: absolute;
    right: 12px;
    font-size: 14px;
    animation: spin 1s linear infinite;
}

.clear-search-icon {
    position: absolute;
    right: 12px;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.clear-search-icon:hover {
    background: var(--border);
    color: var(--text);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 320px;
    max-width: 500px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    margin-top: 4px;
}

/* 点击外部关闭的透明遮罩 */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: transparent;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-item:hover:not(.disabled):not(.selected) {
    background: var(--primary-light);
}

.user-dropdown-item.selected {
    background: #EEF2FF;
}

.user-dropdown-item.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    color: var(--text-secondary);
}

/* 复选框样式 */
.user-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: white;
}

.user-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
}

.user-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-account {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.user-dropdown-item:not(.selected) .user-check {
    background: var(--border);
    color: transparent;
}

.selected-users-container-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding: 8px 0;
}

.clear-all-btn-inline {
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.clear-all-btn-inline:hover {
    background: #FEF2F2;
    border-color: var(--danger);
}

.user-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag-name {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-remove {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
    margin-left: 2px;
}

.tag-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

.clear-all-btn {
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.clear-all-btn:hover {
    background: #FEF2F2;
}

.hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
}
