/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 头部导航 ========== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo .subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

.nav a {
    text-decoration: none;
    color: #555;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ========== 主内容区 ========== */
.main-content {
    padding: 30px 0;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

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

.section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #666;
    font-size: 1.1rem;
    margin-top: 5px;
}

/* ========== 快速导航/日期卡片 ========== */
.quick-nav {
    margin-bottom: 40px;
}

.quick-nav h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.day-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.day-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
}

.day-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

.day-card.highlight {
    border-left-color: #f39c12;
}

.day-card.important {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5, #fff);
}

.day-date {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.day-weekday {
    color: #888;
    font-size: 0.95rem;
    margin: 5px 0;
}

.day-activities,
.day-leaders {
    color: #667eea;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
}

/* ========== 场地信息 ========== */
.venues-section {
    margin-top: 40px;
}

.venues-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.venue-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.venue-card:hover {
    transform: translateY(-3px);
}

.venue-icon {
    font-size: 2rem;
}

.venue-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.venue-address {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========== 领导列表 ========== */
.leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.leader-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.leader-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.leader-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 25px;
    color: white;
    text-align: center;
}

.leader-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.leader-name {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.leader-title {
    font-size: 0.95rem;
    opacity: 0.9;
}

.leader-body {
    padding: 20px;
}

.leader-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.leader-info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-weight: 500;
}

.info-value {
    color: #333;
    font-weight: 600;
}

.leader-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
}

.badge-batch1 { background: #e8f5e9; color: #2e7d32; }
.badge-batch2 { background: #fff3e0; color: #ef6c00; }
.badge-batch3 { background: #e3f2fd; color: #1565c0; }

/* ========== 日程表格 ========== */
.day-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: white;
    color: #555;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

.tab-btn.important {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.schedule-table-container {
    background: white;
    border-radius: 15px;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.schedule-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.schedule-table th:first-child {
    border-radius: 15px 0 0 0;
}

.schedule-table th:last-child {
    border-radius: 0 15px 0 0;
}

.schedule-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 0.88rem;
}

.schedule-table tr:hover {
    background: #f8f9ff;
}

.time-cell {
    font-weight: 600;
    color: #667eea;
    white-space: nowrap;
    text-align: center;
}

.activity-cell {
    max-width: 280px;
}

.activity-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.location-cell {
    color: #888;
    font-size: 0.82rem;
}

.leader-cell {
    text-align: center;
    min-width: 90px;
}

.attending {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1rem;
}

.not-attending {
    color: #ccc;
}

.role-note {
    font-size: 0.78rem;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

/* ========== 短信生成器 ========== */
.sms-generator {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sms-form {
    border-right: 1px solid #eee;
    padding-right: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.sms-preview {
    padding-left: 20px;
}

.sms-preview h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.sms-content {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    min-height: 250px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
}

.placeholder-text {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 80px 20px;
}

.sms-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 10px 15px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
}

/* ========== 模态框 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 30px;
    color: white;
    text-align: center;
}

.modal-header .leader-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.modal-header .leader-title {
    font-size: 1.1rem;
    opacity: 0.9;
}

.modal-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.detail-schedule-item {
    background: #f8f9ff;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
}

.detail-time {
    font-weight: bold;
    color: #667eea;
    font-size: 1rem;
    margin-bottom: 5px;
}

.detail-activity {
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
}

.detail-location {
    color: #888;
    font-size: 0.9rem;
}

.detail-role {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 8px;
}

/* ========== 页脚 ========== */
.footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
}

.footer p {
    margin: 5px 0;
    opacity: 0.9;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .sms-generator {
        grid-template-columns: 1fr;
    }

    .sms-form {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 30px;
    }

    .sms-preview {
        padding-left: 0;
        padding-top: 20px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .day-tabs {
        justify-content: center;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ========== 全部活动日程（首页核心区域）========== */
.all-activities-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header-bar h3 {
    color: white;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.total-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 日期分组 */
.activity-day-group {
    background: white;
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.activity-day-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-day-header.main-day {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.day-header-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.day-header-count {
    font-size: 0.9rem;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 15px;
}

/* 日期分组头部右侧（计数 + 添加按钮）*/
.day-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-add-schedule {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-add-schedule:hover {
    background: white;
    color: #667eea;
    transform: scale(1.15);
}

/* 顶部添加日程按钮 */
.header-bar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-add-activity {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.btn-add-activity:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.45);
}

/* 活动条目的编辑/删除按钮 */
.activity-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    padding-top: 2px;
}

.activity-action-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-action-btn:hover {
    transform: scale(1.1);
}

.activity-action-btn.edit:hover {
    background: #f3e5f5;
    border-color: #7e57c2;
}

.activity-action-btn.delete:hover {
    background: #ffebee;
    border-color: #e74c3c;
}

/* ========== 时间冲突预警样式 ========== */
.detail-schedule-item.has-conflict {
    border-left-color: #e74c3c !important;
    background: #fff5f5;
}

.conflict-warning {
    margin-top: 8px;
    background: linear-gradient(135deg, #fee, #fdd);
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #c0392b;
    font-weight: 600;
    line-height: 1.5;
}

.day-conflict-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 600;
    vertical-align: middle;
    animation: pulse-warning 1.5s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* 按日表格中的冲突单元格 */
.leader-cell.conflict {
    background: #fff5f5;
}

.leader-cell.conflict .attending {
    color: #e74c3c;
}

.conflict-dot {
    display: inline-block;
    color: #e74c3c;
    font-size: 0.9rem;
    margin-left: 2px;
    animation: pulse-warning 1.5s ease-in-out infinite;
}

/* 日程管理模态框提示 */
.activity-modal-tip {
    background: #fffde7;
    border-left: 3px solid #fbc02d;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #6d5c00;
    margin-bottom: 20px;
    line-height: 1.6;
}

.activity-modal-tip code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 活动条目 */
.activity-item {
    padding: 18px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f8f9ff;
}

.activity-item-top {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.activity-time {
    min-width: 100px;
    font-weight: 700;
    color: #667eea;
    font-size: 0.95rem;
    padding-top: 2px;
    white-space: nowrap;
}

.activity-main {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
    line-height: 1.5;
}

.activity-location {
    color: #888;
    font-size: 0.88rem;
}

.activity-location::before {
    content: '📍 ';
}

.activity-owner {
    color: #2c7be5;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 2px;
}

/* 参加领导标签区域 */
.activity-attendees {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding-left: 115px;
}

.attendee-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #e8f0fe, #f3e8fd);
    border: 1px solid #d6c9f0;
    color: #5b3fa8;
    padding: 4px 12px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
}

.attendee-tag .attendee-avatar {
    font-size: 1rem;
}

.attendee-tag .attendee-role {
    font-size: 0.78rem;
    color: #8a7ab8;
    font-weight: 400;
    margin-left: 2px;
}

/* 移除领导按钮 */
.attendee-remove {
    margin-left: 4px;
    cursor: pointer;
    color: #c0392b;
    font-weight: 700;
    border: none;
    background: none;
    font-size: 0.95rem;
    padding: 0 2px;
    line-height: 1;
}

.attendee-remove:hover {
    color: #e74c3c;
}

/* 添加领导按钮 */
.add-leader-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 2px dashed #b39ddb;
    color: #7e57c2;
    padding: 4px 14px;
    border-radius: 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-leader-btn:hover {
    background: #f3e5f5;
    border-color: #7e57c2;
    transform: scale(1.05);
}

.no-attendee-tip {
    color: #bbb;
    font-size: 0.85rem;
    font-style: italic;
}

/* ========== 添加领导模态框 ========== */
.modal-add-leader {
    max-width: 520px;
}

.add-leader-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px 30px;
    color: white;
}

.add-leader-header h3 {
    font-size: 1.3rem;
}

.add-leader-body {
    padding: 25px 30px 30px;
}

/* 模式切换Tab */
.add-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-tab {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mode-tab:hover {
    border-color: #b39ddb;
    color: #7e57c2;
}

.mode-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

/* 表单两列布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.required {
    color: #e74c3c;
    font-weight: 700;
}

/* ========== 联络员信息样式 ========== */
.leader-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e0e0e0;
}
.leader-contact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #c8e6c9;
    border-radius: 18px;
    padding: 5px 14px;
    font-size: 0.88rem;
    color: #2e7d32;
    font-weight: 600;
    min-width: 0;
}

.leader-contact.empty {
    background: #fafafa;
    border-color: #e0e0e0;
    color: #aaa;
    font-weight: 400;
    font-style: italic;
}

.contact-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.contact-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-contact-btn {
    background: white;
    border: 1px solid #d6c9f0;
    color: #7e57c2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.edit-contact-btn:hover {
    background: #f3e5f5;
    border-color: #7e57c2;
    transform: scale(1.05);
}

/* 领导详情页的联络员行 */
.detail-contact-row {
    margin-top: 4px;
    padding-top: 12px;
}

.detail-contact-row .leader-contact {
    font-size: 0.92rem;
}

/* 手动添加领导徽章 */
.badge-batch4 {
    background: #fce4ec;
    color: #c2185b;
}

/* ========== 领导日程编辑（地点 + 备注）========== */
.detail-schedule-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.edit-detail-btn {
    background: white;
    border: 1px solid #d6c9f0;
    color: #7e57c2;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.edit-detail-btn:hover {
    background: #f3e5f5;
    border-color: #7e57c2;
    transform: scale(1.05);
}

.custom-location-tag {
    display: inline-block;
    background: #fff3e0;
    color: #ef6c00;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
}

.detail-note {
    margin-top: 8px;
    background: #fffde7;
    border-left: 3px solid #fbc02d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    color: #6d5c00;
    line-height: 1.6;
}

/* 编辑模态框中的文本域 */
#editDetailNote {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

#editDetailNote:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.current-activity-info {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 15px 18px;
    margin-bottom: 20px;
}

.current-activity-info .ca-title {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
    margin-bottom: 6px;
}

.current-activity-info .ca-meta {
    color: #888;
    font-size: 0.88rem;
}

.current-activity-info .ca-attendees {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 快捷角色按钮 */
.quick-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0 22px;
}

.quick-role-label {
    color: #888;
    font-size: 0.88rem;
    font-weight: 600;
}

.quick-role-btn {
    background: #f0f0f0;
    border: none;
    color: #555;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-role-btn:hover {
    background: #667eea;
    color: white;
}

.add-leader-actions {
    display: flex;
    gap: 12px;
}

/* ========== Toast 操作提示 ========== */
.toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
    .activity-item-top {
        flex-direction: column;
        gap: 6px;
    }

    .activity-time {
        min-width: auto;
    }

    .activity-attendees {
        padding-left: 0;
    }

    .section-header-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .add-mode-tabs {
        flex-direction: column;
    }

    .modal-add-leader {
        width: 95%;
    }

    .add-leader-body {
        padding: 20px 20px 25px;
    }
}

/* ========== 日期输入框样式（添加日程模态框）========== */
#activityDay {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

#activityDay:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#activityDay::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

#activityDay::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ========== 领导卡片：编辑按钮 / 车辆 / 随员 ========== */
.leader-header {
    position: relative;
}

.leader-edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: white;
    padding: 5px 13px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.leader-edit-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.leader-extra-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e8e8e8;
}

.leader-vehicle,
.leader-staff {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e3f2fd, #e8f4fd);
    border: 1px solid #bbdefb;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.83rem;
    color: #1565c0;
    font-weight: 600;
}

.leader-vehicle.empty,
.leader-staff.empty {
    background: #fafafa;
    border-color: #e8e8e8;
    color: #aaa;
    font-weight: 400;
    font-style: italic;
}

.vehicle-icon,
.staff-icon {
    font-size: 0.92rem;
}

.vehicle-text,
.staff-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

/* 领导详情页：车辆/随员展示 */
.leader-contact-row.detail-contact-row .leader-vehicle,
.leader-contact-row.detail-contact-row .leader-staff {
    font-size: 0.9rem;
}

.staff-detail-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9ff;
    border: 1px solid #e8eaf6;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.staff-detail-name {
    font-weight: 700;
    color: #333;
    min-width: 90px;
}

.staff-detail-phone {
    color: #1565c0;
    font-weight: 600;
}

.staff-detail-duty {
    background: #fff3e0;
    color: #ef6c00;
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

/* ========== 领导编辑模态框 ========== */
.modal-leader-edit {
    max-width: 600px;
}

.edit-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #444;
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-section-title:first-of-type {
    margin-top: 8px;
}

.btn-add-staff {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-staff:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.35);
}

/* 随员编辑行 */
.staff-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.staff-row input {
    padding: 9px 11px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    width: 100%;
}

.staff-row input:focus {
    outline: none;
    border-color: #667eea;
}

.staff-remove-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #ffebee;
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.staff-remove-btn:hover {
    background: #e74c3c;
    color: white;
}

.staff-empty-tip {
    color: #aaa;
    font-size: 0.88rem;
    font-style: italic;
    text-align: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .staff-row {
        grid-template-columns: 1fr 1fr;
    }

    .staff-row .staff-duty {
        grid-column: span 2;
    }

    .staff-remove-btn {
        position: absolute;
        top: 4px;
        right: 4px;
    }

    .staff-row {
        position: relative;
        padding-right: 40px;
    }

    .leader-edit-btn {
        position: static;
        margin-top: 10px;
    }

    .vehicle-text,
    .staff-text {
        max-width: 110px;
    }
}

/* 恢复默认数据按钮 */
.btn-reset-data {
    background: white;
    border: 2px solid #e0e0e0;
    color: #888;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-reset-data:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fff5f5;
    transform: translateY(-2px);
}

/* ========== 数据备份按钮组 ========== */
.header-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.save-status {
    font-size: 0.8rem;
    font-weight: 500;
}

.save-status.saved {
    color: rgba(255, 255, 255, 0.85);
}

.save-status.none {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.btn-data-action {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-data-action.export {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.3);
}

.btn-data-action.export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(9, 132, 227, 0.4);
}

.btn-data-action.import {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-data-action.import:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
}

@media (max-width: 768px) {
    .header-bar-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .btn-data-action {
        padding: 7px 13px;
        font-size: 0.82rem;
    }
}

/* ========== 登录验证遮罩 ========== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 45px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: loginAppear 0.4s ease;
}

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

.login-logo {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.login-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #888;
    font-size: 0.92rem;
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

.login-input-group {
    margin-bottom: 16px;
}

.login-input-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.login-input-group input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.login-options {
    margin-bottom: 20px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 2px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-tip {
    margin-top: 18px;
    color: #999;
    font-size: 0.85rem;
    text-align: center;
}

.login-tip code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #667eea;
    font-weight: 700;
}

.login-error {
    margin-top: 12px;
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

/* ========== 导出/打印菜单 ========== */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.export-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.export-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    min-width: 240px;
    padding: 8px;
    z-index: 1000;
}

.export-menu.show {
    display: block;
    animation: menuAppear 0.2s ease;
}

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

.export-menu-title {
    padding: 8px 14px 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1px;
}

.export-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #333;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.export-menu button:hover {
    background: #f3f0ff;
    color: #667eea;
}

.export-menu-divider {
    height: 1px;
    background: #eee;
    margin: 6px 8px;
}

/* 顶栏操作按钮（识别码/退出） */
.header-action-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ========== 打印样式 ========== */
.print-area {
    display: none;
}

@media print {
    body {
        background: white !important;
    }

    /* 隐藏页面所有内容，只显示打印区域 */
    body > *:not(#printArea) {
        display: none !important;
    }

    #printArea {
        display: block !important;
        position: static !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 打印表格样式 */
    .print-title {
        text-align: center;
        font-size: 20pt;
        font-weight: 700;
        margin-bottom: 6pt;
        color: #000;
    }

    .print-subtitle {
        text-align: center;
        font-size: 10pt;
        color: #555;
        margin-bottom: 16pt;
    }

    .print-day-header {
        font-size: 13pt;
        font-weight: 700;
        margin: 14pt 0 6pt;
        padding: 4pt 8pt;
        background: #eef !important;
        border-left: 4pt solid #445;
        color: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10pt;
        font-size: 10pt;
    }

    .print-table th,
    .print-table td {
        border: 1px solid #666;
        padding: 5pt 6pt;
        text-align: left;
        vertical-align: top;
    }

    .print-table th {
        background: #e8e8f0 !important;
        font-weight: 700;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-table .time-cell {
        white-space: nowrap;
        font-weight: 600;
        width: 90pt;
    }

    .print-leader-block {
        page-break-inside: avoid;
        margin-bottom: 14pt;
    }

    .print-leader-name {
        font-size: 12pt;
        font-weight: 700;
        margin-bottom: 4pt;
        padding: 3pt 8pt;
        background: #eef !important;
        border-left: 4pt solid #445;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-footer {
        margin-top: 16pt;
        text-align: center;
        font-size: 9pt;
        color: #777;
    }

    .print-info-table td {
        border: 1px solid #666;
        padding: 4pt 6pt;
        font-size: 10pt;
    }

    .print-info-table .label {
        background: #f0f0f5 !important;
        font-weight: 600;
        width: 100pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    @page {
        margin: 15mm;
    }
}

/* 登录错误抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* 导航栏在小屏幕时的换行适配 */
@media (max-width: 900px) {
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .export-dropdown {
        position: static;
    }

    .export-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .export-menu.show {
        transform: translateX(-50%);
    }
}

/* ========== 详情页：联络员/车辆完整展示（不截断）========== */
.contact-full,
.vehicle-full {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 600;
}

.contact-person {
    color: #2e7d32;
}

.contact-phone {
    color: #1565c0;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 3px 12px;
    letter-spacing: 0.5px;
}

.vehicle-plate {
    color: #1565c0;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 3px 12px;
    letter-spacing: 0.5px;
}

.vehicle-driver {
    color: #444;
}

.vehicle-phone {
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 3px 12px;
}

/* ========== 首页：可点击的领导标签 ========== */
.attendee-tag.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.attendee-tag.clickable:hover {
    background: linear-gradient(135deg, #d6c9f0, #c9b8e8);
    border-color: #7e57c2;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(126, 87, 194, 0.25);
}

.attendee-loc {
    font-size: 0.78rem;
    color: #8a7ab8;
    font-weight: 400;
    margin-left: 3px;
}

.attendee-note-dot {
    margin-left: 3px;
    font-size: 0.8rem;
    cursor: help;
}

/* 小屏适配 */
@media (max-width: 768px) {
    .contact-full,
    .vehicle-full {
        font-size: 0.85rem;
        gap: 6px;
    }

    .contact-phone,
    .vehicle-plate,
    .vehicle-phone {
        padding: 2px 9px;
        font-size: 0.85rem;
    }
}

/* 首页操作提示条 */
.activity-tip-bar {
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    border: 1px solid #ffe082;
    border-left: 4px solid #ffb300;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.88rem;
    color: #6d5c00;
    margin-bottom: 16px;
    line-height: 1.6;
}

.activity-tip-bar b {
    color: #ef6c00;
}

/* ========== 首页标签：备注内容直接展示 ========== */
.attendee-note {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: #8a6d00;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 1px 8px;
    margin-left: 3px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* 按日表格中的备注显示 */
.role-note.note-note {
    color: #8a6d00;
    background: #fffde7;
    border-radius: 4px;
    padding: 1px 5px;
    margin-top: 2px;
}
