:root {
    --color-primary: #03A9F4;
    --color-primary-hover: #0288D7;
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #F44336;
    --color-bg: #F5F7FA;
    --color-border: #E0E6ED;
    --color-text: #2C3E50;
    --color-text-sub: #7F8C9A;
    --panel-bg: #FFFFFF;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', 'SF Pro Text', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    font-weight: 600;
    margin: 0;
}

.app-body {
    min-height: 100vh;
    padding: 24px;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    gap: 24px;
    height: calc(100vh - 48px);
}

.sidebar {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 16px 40px rgba(44, 62, 80, 0.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(3, 169, 244, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.brand-subtitle {
    font-size: 13px;
    color: var(--color-text-sub);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-sub);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--color-text-sub);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(3, 169, 244, 0.08);
    color: var(--color-text);
}

.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    box-shadow: 0 10px 20px rgba(3, 169, 244, 0.16);
}

.sidebar-user select {
    width: 100%;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: var(--panel-bg);
    font-size: 14px;
    color: var(--color-text);
    outline: none;
}

.hero-user-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-sub);
    margin-bottom: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-user-select {
    width: 100%;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    font-size: 13px;
    color: var(--color-text);
}

.workspace {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(44, 62, 80, 0.04);
}

.panel-card {
    background: rgba(245, 247, 250, 0.8);
    border: 1px solid rgba(224, 230, 237, 0.8);
    border-radius: 16px;
    padding: 24px;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 8px;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.workspace-title {
    font-size: 24px;
    font-weight: 700;
}

.workspace-description {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-sub);
}

.sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(3, 169, 244, 0.2);
    background: rgba(3, 169, 244, 0.08);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 6px rgba(3, 169, 244, 0.15);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.filter-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(3, 169, 244, 0.04);
    border: 1px solid rgba(3, 169, 244, 0.08);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.filter-search {
    position: relative;
    flex: 1 1 auto;
}

.filter-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.filter-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border-radius: 12px;
    border: 1px solid rgba(3, 169, 244, 0.2);
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    outline: none;
}

.filter-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(3, 169, 244, 0.12);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--panel-bg);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--color-text);
    outline: none;
    min-width: 140px;
}

.primary-btn,
.primary-btn-outline,
.secondary-btn {
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    box-shadow: 0 12px 24px rgba(3, 169, 244, 0.18);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(3, 169, 244, 0.22);
}

.primary-btn-outline {
    background: transparent;
    border: 1px solid rgba(3, 169, 244, 0.4);
    color: var(--color-primary);
}

.primary-btn-outline:hover {
    background: rgba(3, 169, 244, 0.08);
}

.secondary-btn {
    background: rgba(224, 230, 237, 0.6);
    color: var(--color-text);
}

.secondary-btn.subtle {
    background: transparent;
    color: var(--color-text-sub);
}

.secondary-btn:hover {
    background: rgba(224, 230, 237, 0.9);
}

.status-pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.status-pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(44, 62, 80, 0.08);
    color: var(--color-text-sub);
    font-size: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.status-pill:hover {
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-text);
}

.status-pill.is-active {
    background: rgba(3, 169, 244, 0.18);
    border-color: rgba(3, 169, 244, 0.4);
    color: var(--color-primary);
}

.status-pill .status-count {
    font-weight: 600;
}

.batch-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(3, 169, 244, 0.08);
    border: 1px dashed rgba(3, 169, 244, 0.35);
    border-radius: 12px;
    margin-bottom: 16px;
}

.batch-summary {
    font-size: 13px;
    color: var(--color-text-sub);
}

.batch-count {
    font-weight: 600;
    color: var(--color-primary);
}

.toolbar-btn {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(224, 230, 237, 0.6);
    background: var(--panel-bg);
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.toolbar-btn.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border: none;
    color: #fff;
}

.toolbar-btn.subtle {
    background: transparent;
    border: none;
    color: var(--color-text-sub);
}

.professors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    flex: 1 1 auto;
}

.grid-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px;
    font-size: 14px;
    color: var(--color-text-sub);
}

.professor-card {
    position: relative;
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid rgba(224, 230, 237, 0.6);
    box-shadow: 0 18px 32px rgba(44, 62, 80, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.professor-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(44, 62, 80, 0.12);
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
}

.accent-blue .card-accent { background: linear-gradient(90deg, #03A9F4, #0288D7); }
.accent-indigo .card-accent { background: linear-gradient(90deg, #5C6BC0, #3F51B5); }
.accent-emerald .card-accent { background: linear-gradient(90deg, #4CAF50, #43A047); }
.accent-amber .card-accent { background: linear-gradient(90deg, #FFB74D, #FF9800); }
.accent-teal .card-accent { background: linear-gradient(90deg, #26A69A, #00897B); }
.accent-rose .card-accent { background: linear-gradient(90deg, #F06292, #E91E63); }
.accent-neutral .card-accent { background: linear-gradient(90deg, #B0BEC5, #90A4AE); }

.card-content {
    padding: 20px;
}

.card-content-selection {
    padding-left: 44px;
}

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

.card-header-selection {
    padding-left: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.card-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--color-text-sub);
}

.card-meta-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-text-sub);
}

.university-chip,
.operator-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 500;
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-primary);
}

.operator-chip {
    background: rgba(124, 179, 66, 0.12);
    color: var(--color-success);
}

.card-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(224, 230, 237, 0.6);
    color: var(--color-text-sub);
}

.status-待发送 { background: rgba(224, 230, 237, 0.6); color: var(--color-text-sub); }
.status-已发送 { background: rgba(3, 169, 244, 0.15); color: var(--color-primary); }
.status-已读 { background: rgba(2, 136, 215, 0.15); color: #0277BD; }
.status-已回复 { background: rgba(76, 175, 80, 0.18); color: var(--color-success); }
.status-待面试 { background: rgba(255, 152, 0, 0.18); color: var(--color-warning); }
.status-已接受 { background: rgba(76, 175, 80, 0.24); color: #2E7D32; }
.status-已拒绝 { background: rgba(244, 67, 54, 0.18); color: var(--color-error); }

.match-chip,
.followup-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-primary);
}

.followup-chip {
    background: rgba(255, 152, 0, 0.12);
    color: var(--color-warning);
}

.card-section {
    margin-top: 16px;
}

.card-section-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-sub);
    margin-bottom: 8px;
}

.card-tags,
.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip,
.research-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-primary);
}

.tag-chip {
    background: rgba(255, 152, 0, 0.12);
    color: var(--color-warning);
}

.research-tag-more {
    background: rgba(2, 136, 215, 0.16);
    color: #01579B;
    font-weight: 600;
}

.application-summary {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(224, 230, 237, 0.8);
    border-radius: 12px;
    background: rgba(245, 247, 250, 0.6);
}

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

.summary-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-sub);
}

.summary-value {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.summary-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-text-sub);
    line-height: 1.5;
}

.application-empty {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(3, 169, 244, 0.08);
    font-size: 13px;
    color: var(--color-primary);
}

.quick-status-group {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(245, 247, 250, 0.8);
    border: 1px solid rgba(224, 230, 237, 0.8);
}

.quick-status-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-sub);
    margin-bottom: 10px;
}

.quick-status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-status-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid rgba(224, 230, 237, 0.8);
    background: transparent;
    color: var(--color-text-sub);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.quick-status-btn:hover {
    border-color: rgba(3, 169, 244, 0.4);
    color: var(--color-primary);
}

.quick-status-btn.is-active {
    background: rgba(3, 169, 244, 0.16);
    border-color: rgba(3, 169, 244, 0.4);
    color: var(--color-primary);
}

.quick-followup-group {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(2, 136, 215, 0.08);
    border: 1px dashed rgba(2, 136, 215, 0.35);
}

.quick-followup-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-hover);
    margin-bottom: 10px;
}

.followup-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.followup-presets {
    display: flex;
    gap: 8px;
}

.followup-custom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.followup-label {
    font-size: 12px;
    color: var(--color-text-sub);
}

.followup-input {
    border-radius: 10px;
    border: 1px solid rgba(3, 169, 244, 0.35);
    padding: 6px 10px;
    font-size: 12px;
    color: var(--color-text);
    outline: none;
}

.followup-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.18);
}

.quick-followup-btn,
.followup-save-btn {
    padding: 6px 10px;
    border-radius: 8px;
    border: none;
    background: rgba(3, 169, 244, 0.16);
    color: var(--color-primary);
    font-size: 12px;
    cursor: pointer;
}

.followup-save-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(3, 169, 244, 0.18);
}

.quick-followup-btn:hover {
    background: rgba(2, 136, 215, 0.16);
}

.followup-save-btn:hover {
    box-shadow: 0 14px 24px rgba(3, 169, 244, 0.22);
}

.card-links {
    margin-top: 18px;
}

.card-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.card-link-button:hover {
    background: rgba(2, 136, 215, 0.18);
}

.card-footer {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

button.is-loading,
.quick-status-btn.is-loading,
.quick-followup-btn.is-loading {
    cursor: wait !important;
    opacity: 0.6;
}

.card-footer > button:first-child {
    flex: 1 1 auto;
}

.danger-outline-btn {
    border: 1px solid rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.08);
    color: var(--color-error);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.danger-outline-btn:hover {
    background: rgba(244, 67, 54, 0.12);
}

.load-more-bar {
    margin-top: 20px;
    text-align: center;
}

.info-panel {
    background: var(--panel-bg);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 16px 40px rgba(44, 62, 80, 0.04);
    overflow: auto;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

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

.metric-card {
    background: rgba(3, 169, 244, 0.06);
    border: 1px solid rgba(3, 169, 244, 0.12);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 12px;
    color: var(--color-text-sub);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.overview-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-card {
    border-radius: 12px;
    border: 1px solid rgba(224, 230, 237, 0.8);
    padding: 12px 14px;
    background: rgba(245, 247, 250, 0.6);
}

.overview-card.accent-warning {
    border-color: rgba(255, 152, 0, 0.35);
    background: rgba(255, 152, 0, 0.12);
}

.overview-card.accent-info {
    border-color: rgba(3, 169, 244, 0.3);
    background: rgba(3, 169, 244, 0.12);
}

.overview-label {
    font-size: 12px;
    color: var(--color-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.overview-value {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 0;
}

.overview-desc {
    font-size: 12px;
    color: var(--color-text-sub);
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(224, 230, 237, 0.8);
    background: rgba(245, 247, 250, 0.7);
}

.insight-card-danger {
    border-color: rgba(244, 67, 54, 0.35);
    background: rgba(244, 67, 54, 0.12);
}

.insight-card-warning {
    border-color: rgba(255, 152, 0, 0.35);
    background: rgba(255, 152, 0, 0.12);
}

.insight-card-info {
    border-color: rgba(3, 169, 244, 0.3);
    background: rgba(3, 169, 244, 0.12);
}

.insight-message {
    font-size: 13px;
    color: var(--color-text);
    flex: 1 1 auto;
}

.insight-action {
    border: none;
    background: rgba(3, 169, 244, 0.18);
    color: var(--color-primary);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.insight-empty {
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(3, 169, 244, 0.35);
    text-align: center;
    color: var(--color-primary);
    background: rgba(3, 169, 244, 0.08);
    font-weight: 600;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 29, 37, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 40;
}

.modal-card {
    width: min(720px, 100%);
    max-height: 90vh;
    background: var(--panel-bg);
    border-radius: 20px;
    box-shadow: 0 40px 60px rgba(44, 62, 80, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--color-text-sub);
    margin-top: 6px;
}

.modal-close-btn {
    border: none;
    background: transparent;
    color: var(--color-text-sub);
    font-size: 28px;
    cursor: pointer;
}

.modal-section {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.modal-section-text {
    font-size: 14px;
    color: var(--color-text-sub);
    line-height: 1.6;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(3, 169, 244, 0.12);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.modal-summary {
    border: 1px solid rgba(224, 230, 237, 0.8);
    border-radius: 12px;
    padding: 16px;
    background: rgba(245, 247, 250, 0.6);
}

.modal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.modal-summary-label {
    font-size: 11px;
    color: var(--color-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-summary-value {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
}

.modal-summary-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-text-sub);
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.modal-field-label {
    font-weight: 600;
    color: var(--color-text-sub);
}

.modal-input,
.modal-select,
.modal-textarea {
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--color-text);
    outline: none;
}

.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(3, 169, 244, 0.12);
}

.modal-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', sans-serif;
}

.modal-textarea-code {
    font-family: 'JetBrains Mono', monospace;
}

.modal-field-hint {
    font-size: 12px;
    color: var(--color-text-sub);
}

.modal-checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-sub);
}

.modal-checkbox input {
    width: 16px;
    height: 16px;
}

.modal-primary-btn {
    width: 100%;
    margin-top: 16px;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(3, 169, 244, 0.18);
}

.modal-empty-state {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-sub);
    padding: 16px 0;
}

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

.modal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 280px;
    max-width: 400px;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 18px 32px rgba(44, 62, 80, 0.12);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    background: #fff;
    border-left: 4px solid var(--color-primary);
    animation: slideIn 0.3s ease;
    z-index: 60;
}

.toast-success {
    border-left-color: var(--color-success);
    background: rgba(76, 175, 80, 0.12);
}

.toast-error {
    border-left-color: var(--color-error);
    background: rgba(244, 67, 54, 0.12);
}

.toast-info {
    border-left-color: var(--color-primary);
    background: rgba(3, 169, 244, 0.12);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 1280px) {
    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    .info-panel {
        display: none;
    }
}

@media (max-width: 960px) {
    .app-body {
        padding: 16px;
    }
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }
    .sidebar {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .sidebar-section {
        flex: 1;
    }
    .workspace {
        margin-top: 16px;
    }
    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-controls {
        flex-wrap: wrap;
    }
    .modal-card {
        width: 100%;
    }
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   跟进时间轴组件样式
   ======================================== */

/* 时间轴区域 */
.timeline-section {
    margin-top: 24px;
}

.timeline-logs {
    margin-bottom: 24px;
}

/* 时间轴 */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline-empty {
    text-align: center;
    padding: 32px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

/* 时间轴条目 */
.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 28px;
    bottom: -4px;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item:last-child::before {
    display: none;
}

/* 时间轴标记 */
.timeline-marker {
    position: absolute;
    left: -32px;
    top: 0;
    width: 16px;
    height: 16px;
}

.timeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 时间轴内容 */
.timeline-content {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    position: relative;
    transition: all 0.2s;
}

.timeline-content:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.timeline-type {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.timeline-time {
    font-size: 12px;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
}

.timeline-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.timeline-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.timeline-operator {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.timeline-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 11px;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
}

.timeline-content:hover .timeline-delete-btn {
    opacity: 1;
}

.timeline-delete-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* 添加跟进表单 */
.add-log-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.add-log-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
}

.add-log-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.add-log-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-log-field-full {
    grid-column: 1 / -1;
}

.add-log-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.add-log-select,
.add-log-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    transition: all 0.2s;
    font-family: inherit;
}

.add-log-select:focus,
.add-log-textarea:focus {
    outline: none;
    border-color: #03A9F4;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.1);
}

.add-log-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.add-log-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #03A9F4 0%, #0288D7 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-log-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.3);
}

.add-log-btn:active {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -24px;
    }

    .timeline-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ========================================
   高级筛选组件样式
   ======================================== */

.advanced-filters {
    margin-top: 16px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.filter-group-full {
    grid-column: 1 / -1;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.filter-input-small,
.filter-input-tiny {
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    transition: all 0.2s;
}

.filter-input-tiny {
    width: 80px;
    padding: 6px 8px;
    font-size: 13px;
}

.filter-input-small:focus,
.filter-input-tiny:focus {
    outline: none;
    border-color: #03A9F4;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.1);
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-range span {
    font-size: 13px;
    color: #6b7280;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    margin-top: 4px;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-checkbox span {
    user-select: none;
}

.advanced-filters-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.primary-btn-sm,
.secondary-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.primary-btn-sm {
    background: linear-gradient(135deg, #03A9F4 0%, #0288D7 100%);
    color: white;
}

.primary-btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3, 169, 244, 0.3);
}

.secondary-btn-sm {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.secondary-btn-sm:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

#advanced-filter-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 10px;
}

#advanced-filter-icon.rotated {
    transform: rotate(-90deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .advanced-filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-group-full {
        grid-column: 1;
    }

    .advanced-filters-actions {
        flex-direction: column;
    }

    .primary-btn-sm,
    .secondary-btn-sm {
        width: 100%;
    }
}

/* ==================== 批量操作下拉菜单样式 ==================== */

.batch-dropdown {
    position: relative;
    display: inline-block;
}

.batch-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 160px;
    margin-top: 4px;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.batch-dropdown-menu.hidden {
    display: none;
}

.batch-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 14px;
    color: #2c3e50;
    background: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.batch-menu-item:hover {
    background: #f5f7fa;
}

.batch-menu-item:active {
    background: #e8ecf1;
}

.dropdown-btn {
    position: relative;
    padding-right: 32px;
}

.dropdown-btn::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.6;
}

/* ==========================================
   数据导入功能样式
   ========================================== */

/* 大尺寸模态框 */
.modal-card-large {
    max-width: 900px;
    width: 95%;
}

/* 导入内容容器 */
.import-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 文件上传区域 */
.import-upload-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* CSV拖放区域 */
.csv-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.csv-drop-zone:hover {
    border-color: #03A9F4;
    background: #f0f9ff;
}

.csv-drop-zone.drag-over {
    border-color: #03A9F4;
    background: #e0f2fe;
    border-style: solid;
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.drop-zone-text {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
}

.drop-zone-hint {
    font-size: 14px;
    color: #64748b;
}

/* CSV字段说明 */
.import-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #03A9F4;
}

.import-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.import-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
}

.import-info-list li {
    font-size: 13px;
    color: #475569;
    padding: 4px 0;
}

.import-info-list li strong {
    color: #1e293b;
    font-weight: 600;
}

/* 导入操作按钮 */
.import-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 数据预览区域 */
.import-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 统计信息 */
.import-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-item.stat-total {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.stat-item.stat-valid {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.stat-item.stat-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

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

.stat-total .stat-value {
    color: #0284c7;
}

.stat-valid .stat-value {
    color: #16a34a;
}

.stat-error .stat-value {
    color: #dc2626;
}

/* 错误列表 */
.import-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
}

.import-errors h4 {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 12px;
}

.import-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.import-errors li {
    font-size: 13px;
    color: #991b1b;
    padding: 6px 0;
    border-bottom: 1px solid #fee2e2;
}

.import-errors li:last-child {
    border-bottom: none;
}

/* 预览表格容器 */
.import-table-wrapper {
    overflow-x: auto;
}

.import-table-wrapper h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

/* 预览表格 */
.import-preview-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.import-preview-table thead {
    background: #f8fafc;
}

.import-preview-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.import-preview-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.import-preview-table tbody tr:hover {
    background: #f8fafc;
}

.import-preview-table tbody tr:last-child td {
    border-bottom: none;
}

/* 导入按钮区域 */
.import-footer {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.import-footer .primary-btn {
    min-width: 160px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-card-large {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .import-stats {
        grid-template-columns: 1fr;
    }

    .import-info-list {
        grid-template-columns: 1fr;
    }

    .csv-drop-zone {
        padding: 32px 16px;
    }
}

/* ==========================================
   数据可视化图表样式
   ========================================== */

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    padding: 8px 0;
}

.chart-container canvas {
    max-height: 300px;
}

/* 响应式图表调整 */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }

    .chart-container canvas {
        max-height: 250px;
    }
}

/* ==========================================
   自定义Modal组件样式
   ========================================== */

/* Modal遮罩层 */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.custom-modal-overlay.show {
    opacity: 1;
}

/* Modal容器 */
.custom-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.custom-modal-overlay.show .custom-modal {
    transform: scale(1);
}

/* Modal头部 */
.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.custom-modal-close:hover {
    background: #f1f5f9;
    color: #334155;
}

/* Modal主体 */
.custom-modal-body {
    padding: 24px;
}

.custom-modal-body p {
    margin: 0 0 16px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

/* Modal详细信息 */
.custom-modal-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    max-height: 200px;
    overflow-y: auto;
}

/* Modal输入框 */
.custom-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
}

.custom-modal-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-modal-input.error {
    border-color: #ef4444;
}

.custom-modal-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Modal错误提示 */
.custom-modal-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

/* Modal底部 */
.custom-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

/* Modal按钮 */
.custom-modal-btn-cancel,
.custom-modal-btn-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.custom-modal-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.custom-modal-btn-cancel:hover {
    background: #e2e8f0;
}

.custom-modal-btn-confirm {
    background: #3b82f6;
    color: white;
}

.custom-modal-btn-confirm:hover {
    background: #2563eb;
}

.custom-modal-btn-confirm.danger {
    background: #ef4444;
}

.custom-modal-btn-confirm.danger:hover {
    background: #dc2626;
}

.custom-modal-btn-confirm.warning {
    background: #f59e0b;
}

.custom-modal-btn-confirm.warning:hover {
    background: #d97706;
}

/* danger类型Modal */
.custom-modal.danger .custom-modal-header {
    background: #fef2f2;
    border-bottom-color: #fecaca;
}

.custom-modal.danger .custom-modal-header h3 {
    color: #dc2626;
}

/* warning类型Modal */
.custom-modal.warning .custom-modal-header {
    background: #fffbeb;
    border-bottom-color: #fde68a;
}

.custom-modal.warning .custom-modal-header h3 {
    color: #d97706;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .custom-modal-overlay {
        padding: 0;
    }

    .custom-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .custom-modal-footer {
        flex-direction: column-reverse;
    }

    .custom-modal-btn-cancel,
    .custom-modal-btn-confirm {
        width: 100%;
    }
}

/* ========================================
   骨架屏加载动画 (Skeleton Screens)
   ======================================== */

/* 基础骨架屏元素 */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 骨架屏卡片 */
.skeleton-card {
    pointer-events: none;
}

/* 各种骨架屏元素类型 */
.skeleton-header {
    height: 24px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short {
    width: 70%;
}

.skeleton-button {
    height: 32px;
    width: 80px;
    border-radius: 6px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-number {
    height: 36px;
    width: 60px;
}

/* 骨架屏Footer */
.skeleton-footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* 时间线骨架屏 */
.timeline-skeleton {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item-skeleton {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 列表骨架屏 */
.list-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item-skeleton {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(
            90deg,
            #2d3748 0%,
            #4a5568 20%,
            #2d3748 40%,
            #2d3748 100%
        );
    }

    .list-item-skeleton {
        background: #1a202c;
    }
}

/* ==========================================
   移动端优化样式 (Mobile Optimizations)
   ========================================== */

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
    display: none; /* 默认隐藏，仅在移动端显示 */
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--panel-bg);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(3, 169, 244, 0.08);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.2);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* 汉堡图标 */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 汉堡图标激活状态 (变成X) */
.mobile-menu-btn.active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* 移动端FAB浮动操作按钮 */
.mobile-fab {
    display: none; /* 默认隐藏，仅在移动端显示 */
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

/* FAB主按钮 */
.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    border: none;
    box-shadow: 0 6px 20px rgba(3, 169, 244, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(3, 169, 244, 0.5);
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-icon {
    font-size: 28px;
    color: white;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* FAB展开状态 */
.mobile-fab.expanded .fab-icon {
    transform: rotate(45deg);
}

/* FAB操作按钮容器 */
.fab-actions {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-fab.expanded .fab-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* FAB子按钮 */
.fab-action {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.fab-action:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.25);
}

.fab-action:active {
    transform: scale(0.95);
}

/* FAB按钮动画：从下往上依次出现 */
.mobile-fab.expanded .fab-action:nth-child(1) {
    animation: fab-slide-up 0.3s ease 0.05s both;
}

.mobile-fab.expanded .fab-action:nth-child(2) {
    animation: fab-slide-up 0.3s ease 0.1s both;
}

.mobile-fab.expanded .fab-action:nth-child(3) {
    animation: fab-slide-up 0.3s ease 0.15s both;
}

@keyframes fab-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   响应式布局 - 移动端优化
   ========================================== */

@media (max-width: 768px) {
    /* 显示汉堡菜单按钮 */
    .mobile-menu-btn {
        display: flex;
    }

    /* 显示FAB浮动按钮 */
    .mobile-fab {
        display: block;
    }

    /* 侧边栏默认隐藏在屏幕外 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        margin: 0;
        border-radius: 0;
        flex-direction: column;
        gap: 24px;
    }

    /* 侧边栏打开状态 */
    .sidebar.open {
        transform: translateX(0);
    }

    /* 调整应用布局 */
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 0;
    }

    /* 调整过滤卡片间距 */
    .filter-card {
        margin-left: 0;
        margin-right: 0;
    }

    /* 调整导师卡片网格 */
    .professors-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 调整批量操作工具栏 */
    .batch-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .batch-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: stretch;
    }

    .batch-actions button {
        flex: 1 1 calc(50% - 4px);
        min-width: 120px;
    }

    /* 调整Toast通知位置 */
    .toast {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    /* 调整Modal卡片 */
    .modal-card,
    .custom-modal {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    /* 调整应用主体padding */
    .app-body {
        padding: 88px 12px 12px 12px; /* 顶部留空间给汉堡菜单 */
    }

    /* 隐藏桌面端的同步指示器等元素 */
    .sync-indicator {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* 调整工作区标题 */
    .workspace-title {
        font-size: 20px;
    }

    .workspace-description {
        font-size: 13px;
    }
}

/* 小屏手机优化 (320px - 480px) */
@media (max-width: 480px) {
    .mobile-menu-btn {
        width: 44px;
        height: 44px;
        top: 16px;
        left: 16px;
    }

    .mobile-fab {
        bottom: 20px;
        right: 20px;
    }

    .fab-main {
        width: 52px;
        height: 52px;
    }

    .fab-action {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .sidebar {
        width: 260px;
    }

    .app-body {
        padding: 76px 8px 8px 8px;
    }

    .filter-card {
        padding: 12px;
    }

    .workspace {
        padding: 16px;
    }

    .professor-card {
        border-radius: 12px;
    }

    .batch-actions button {
        flex: 1 1 100%;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* 平板横屏优化 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .professors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-shell {
        grid-template-columns: 200px minmax(0, 1fr);
    }
}

