
* { 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, #d1e3f3 25%, #d4f1e8 100%);
    height: 100vh; 
    overflow: hidden;
}


/* 主布局 */
.app { display: flex; height: 100vh; }

/* 侧边栏 */
.sidebar {
    width: 200px; background: #d1e3f3; border-right: 1px solid #aa6d6d;
    display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0;
}
.logo {
    padding: 16px; display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid #f19292;
}

.logo-icon {
    width: 50px; height: 50px;
    background-image: url('/icon/da3c01a6f7f8661bd1dcdfe573fca6f9.png');
    background-size: cover;           /* 图片覆盖整个区域 */
    background-position: center;      /* 图片居中 */
    background-repeat: no-repeat;     /* 不重复 */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ece6e6;
    font-size: 12px;
    font-weight: bold;
}

.logo-text { font-size: 18px; font-weight: 700; color: #070707; }
.menu-section { padding: 8px 0; }
.menu-title {
    padding: 8px 16px; font-size: 18px; color: #311717; font-weight: 500;
}

.menu-item {
    display: flex; align-items: center; padding: 10px 16px;
    cursor: pointer; transition: all 0.3s; color: #1b1818; font-size: 16px; gap: 10px;
    text-decoration: none;
}

.menu-item:hover { background: #b0b0ec; color: #010861; }
.menu-item.active { background: #f0eff6; color: #0d25b1; border-right: 4px solid #4c3f8c; }
.menu-icon { width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; }






/* 主内容 */
/* 上边栏 */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header {
    height: 70px; background: linear-gradient(135deg, #bdd9f3 50%, #6ecfaf 100%); display: flex;
    align-items: center; justify-content: space-between; padding: 0 50px; color: #000000;
}

.header-title { font-size: 25px; font-weight: 900; }

.header-user {
    display: flex; align-items: center; gap: 8px; font-size: 20px; cursor: pointer;
    position: relative;
}
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.user-dropdown {
    position: absolute; top: 40px; right: 0;
    background: #fff; border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    min-width: 120px; display: none; z-index: 100;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: block; padding: 10px 16px; color: #333; font-size: 13px;
    text-decoration: none; cursor: pointer;
}
.user-dropdown a:hover { background: #f5f5f5; color: #4c3f8c; }
.user-dropdown .divider { height: 1px; background: #f0f0f0; margin: 4px 0; }


.content { flex: 1; padding: 16px; overflow-y: auto; }
.content-wrapper {
    background: #fff; border-radius: 4px; padding: 20px; min-height: 400px;
}


/* 搜索区 */
.search-area { margin-bottom: 16px; }
.search-row { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.search-item { display: flex; align-items: center; gap: 8px; }
.search-label { font-size: 12px; color: #666; white-space: nowrap; }
.search-input, .search-select {
    width: 140px; height: 32px; border: 1px solid #d9d9d9;
    border-radius: 4px; padding: 0 8px; font-size: 13px; outline: none;
}
.search-input:focus, .search-select:focus { border-color: #4c3f8c; }
.search-input::placeholder { color: #bfbfbf; }

/* 按钮 */
.btn {
    height: 32px; padding: 0 16px; border-radius: 4px; border: 1px solid transparent;
    font-size: 13px; cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;}
.btn-primary { background: #4c3f8c; color: #fff; border-color: #4c3f8c; }
.btn-primary:hover { background: #3d3270; }
.btn-default { background: #fff; color: #666; border: 1px solid #d9d9d9; }
.btn-default:hover { color: #4c3f8c; border-color: #4c3f8c; }
.btn-success { background: #52c41a; color: #fff; border-color: #52c41a; }
.btn-success:hover { background: #389e0d; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; }

.action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.action-left, .action-right { display: flex; gap: 8px; }

/* 删除按钮 - 红色（推荐） */
.btn-delete-row {
    background-color: #ff4d4f;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-delete-row:hover {
    background-color: #cf1322;
}



/* 表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    background: #fafafa; padding: 12px 8px; text-align: left;
    font-weight: 500; color: #666; border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.data-table td {
    padding: 12px 8px; border-bottom: 1px solid #f0f0f0;
    color: #333; white-space: nowrap;
}
.data-table tr:hover { background: #fafafa; }
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 12px;
}
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-purple { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* 生源老师头像环绕 - 绿色 */
.avatar-teacher {
    box-shadow: 0 0 0 2px #52c41a;
}


/* 空状态 */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 60px 0; color: #999; font-size: 14px;
}

/* 弹窗 */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; z-index: 500;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff; border-radius: 8px; width: 560px; max-height: 80vh;
    overflow-y: auto; box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.modal-header {
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 15px; font-weight: 500; color: #333; }
.modal-close { cursor: pointer; color: #999; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 12px 20px; border-top: 1px solid #f0f0f0;
    display: flex; justify-content: flex-end; gap: 8px;
}

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: #666; }
.form-item label .required { color: #ff4d4f; margin-left: 2px; }
.form-item input, .form-item select {
    height: 36px; border: 1px solid #d9d9d9; border-radius: 4px;
    padding: 0 10px; font-size: 13px; outline: none;
}
.form-item input:focus, .form-item select:focus { border-color: #4c3f8c; }

/* 表格容器 - 支持横向滚动 */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1200px;
}

.data-table th,
.data-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.data-table th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
}

.data-table tr:hover {
    background: #fafafa;
}

/* 标签样式 */
.tag-green {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.tag-gray {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #e8e8e8;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* 基础列宽（适用于所有用户） */
.data-table th:nth-child(1) { width: 50px; }   /* 序号 */
.data-table th:nth-child(2) { width: 100px; }  /* 学生姓名 */
.data-table th:nth-child(3) { width: 60px; }   /* 性别 */
.data-table th:nth-child(4) { width: 160px; }  /* 证件号码 */
.data-table th:nth-child(5) { width: 120px; }  /* 学号 */
.data-table th:nth-child(6) { width: 110px; }  /* 手机号 */
.data-table th:nth-child(7) { width: 80px; }   /* 年级 */
.data-table th:nth-child(8) { width: 260px; }  /* 学校名称 */
.data-table th:nth-child(9) { width: 240px; }  /* 专业 */
.data-table th:nth-child(10) { width: 80px; }  /* 层次 */

/* 管理员模式：第11、12列是上家和生源老师 */
body.admin-mode .data-table th:nth-child(11) { width: 120px; }  /* 上家 */
body.admin-mode .data-table th:nth-child(12) { width: 120px; }  /* 生源老师 */
body.admin-mode .data-table th:nth-child(13) { width: 90px; }   /* 学籍状态 */
body.admin-mode .data-table th:nth-child(14) { width: 150px; }  /* 备注 */

/* 普通模式：第11、12列是学籍状态和备注 */
body:not(.admin-mode) .data-table th:nth-child(11) { width: 90px; }   /* 学籍状态 */
body:not(.admin-mode) .data-table th:nth-child(12) { width: 150px; }  /* 备注 */

/* 编辑模式输入框样式 bigan ================================*/
.edit-input, .edit-select {
    width: 100%;
    min-width: 100px;
    padding: 6px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.edit-input:focus, .edit-select:focus {
    outline: none;
    border-color: #4c3f8c;
    box-shadow: 0 0 0 2px rgba(76, 63, 140, 0.2);
}

/* 提交按钮 */
.btn-submit {
    background: #52c41a;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-submit:hover {
    background: #389e0d;
}
/* 编辑模式输入框样式 end ================================*/

/* 表格单元格可选中复制 */
.data-table td {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    cursor: text;
}

/* 选中文本的背景色（类似Excel） */
.data-table td::selection {
    background: #b3d4fc;
    color: #000;
}

.data-table td::-moz-selection {
    background: #b3d4fc;
    color: #000;
}

/* 表头也可以选中（可选） */
.data-table th {
    user-select: text;
    -webkit-user-select: text;
}

/* 非编辑模式下，鼠标悬停显示可复制 */
.data-table td:hover {
    background-color: #f0eff6;
}
/* 单元格内容可选中 */
.data-table td {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    cursor: text;
}

/* 选中单元格内容时的背景色 */
.data-table td::selection {
    background: #b3d4fc;
    color: #000;
}

/* 单元格内容可选中 */
.data-table td {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    cursor: text;
}

/* 选中单元格内容时的背景色 */
.data-table td::selection {
    background: #b3d4fc;
    color: #000;
}



/* 分页组件样式 - 居中对齐 bigan ================================*/
.pagination-container {
    display: flex;
    justify-content: center;     /* 按钮居中 */
    align-items: center;
    margin-top: 20px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 4px;
    position: relative;           /* 添加相对定位 */
}

.pagination-info {
    color: #666;
    font-size: 13px;
    position: absolute;
    left: 20px;  /* 总条数靠左 */
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-page {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-page:hover:not(:disabled) {
    color: #4c3f8c;
    border-color: #4c3f8c;
}

.btn-page:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    color: #666;
    font-size: 13px;
}

.page-size-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    position: absolute;
    right: 20px;  /* 每页条数靠右 */
}

/* 分页组件样式 - 居中对齐 end ================================*/





/* 个人中心 */
.profile-card {
    background: #fff; border-radius: 4px; padding: 32px;
    max-width: 600px;
}
.profile-section { margin-bottom: 24px; }
.profile-section-title { font-size: 14px; font-weight: 500; color: #333; margin-bottom: 16px; }
.profile-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-label { width: 80px; font-size: 13px; color: #666; text-align: right; }
.profile-value { font-size: 13px; color: #333; flex: 1; }
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: #f0f0f0; display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #999;
}

/* 页面切换 */
.page { display: none; }
.page.active { display: block; }




/* ==============角色类型调整=============== */
/* 默认隐藏管理员专属字段 */
.admin-only {
    display: none;
}

/* 当body有admin-mode类时显示 */
body.admin-mode .admin-only {
    display: flex;
}


/* ==============通知组件=============== */
/* Toast 通知样式 */
.toast {
    position: fixed;
    top: 10px;
    right: 820px;
    background: #4c3f8c;
    color: white;
    padding: 18px 36px;
    border-radius: 8px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: #95d377;
}

.toast.error {
    background: #f37e80;
}

.toast.warning {
    background: #faad14;
}

/* 输入下拉选择框 */
/* 自动补全下拉框整体 */
.autocomplete-box {
    position: absolute;      /* 相对于 input 的父元素 */
    top: 100%;               /* 紧贴输入框下方 */
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: 200px;       /* 最大高度，超过显示滚动条 */
    overflow-y: auto;        /* 超出内容滚动 */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: none;           /* 默认隐藏，由 JS 控制显示 */
}

/* 自动补全下拉每一项 */
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}

/* 鼠标 hover 效果 */
.autocomplete-item:hover {
    background-color: #f5f5f5;
}

/* 通过键盘上下键选中的项 */
.autocomplete-item.highlight {
    background-color: #007bff;
    color: #fff;
}

.btn-reset-pwd {
    background: #52c41a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
}
.btn-reset-pwd:hover {
    background: #389e0d;
}

.profile-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

.profile-label {
    width: 80px;
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}

.profile-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.profile-row input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.profile-row input:focus {
    
    border-color: #4c3f8c;
    outline: none;
}

.profile-row .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.profile-row .btn-primary {
    background: #4c3f8c;
    color: white;
    border-color: #4c3f8c;
}

.profile-row .btn-primary:hover {
    
    background: #3d3270;
}

.profile-row .btn-default {
    background: white;
    color: #666;
    border-color: #d9d9d9;
}

.profile-row .btn-default:hover {

    color: #4c3f8c;
    border-color: #4c3f8c;
}

.tag-red {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* ========== 标签颜色系统 ========== */

/* 绿色 - 正常/启用/成功 */
.tag-green {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* 紫色 - 管理员/高级 */
.tag-purple {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

/* 红色 - 停用/错误/删除 */
.tag-red {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 蓝色 - 普通用户/信息 */
.tag-blue {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

/* 橙色 - 警告/待处理 */
.tag-orange {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

/* 灰色 - 禁用/未知 */
.tag-gray {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #e8e8e8;
}

/* 青色 - 国开/特殊类型 */
.tag-cyan {
    background: #e6fffb;
    color: #13c2c2;
    border: 1px solid #87e8de;
}

/* 黄色 - 提醒/注意 */
.tag-yellow {
    background: #feffe6;
    color: #fadb14;
    border: 1px solid #fffb8f;
}


/* 删除按钮颜色 */
/* 默认状态 - 灰色 */
.btn-delete {
    background: #dfd9d9;
    color: #3f3838;
    border: 1px solid #e8e8e8;
}
/* 激活状态 - 红色 */
.btn-delete.active {
    background: #ff4d4f;
    color: #fff;
    border: 1px solid #ff4d4f;
}