/* ========================================
   公共样式 - 百校百飞学苑管理后台（优化版）
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.6;
}

/* ========================================
   整体布局
   ======================================== */

.layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* 主内容区 */
.main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   侧边栏样式
   ======================================== */

.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background-color: #1a252f;
    border-bottom: 2px solid #3498db;
    letter-spacing: 1px;
    gap: 10px;
}

.sidebar-logo i {
    font-size: 24px;
    color: #3498db;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    color: #fff;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.15) 0%, rgba(52, 152, 219, 0.05) 100%);
    border-left-color: #3498db;
}

.menu-item.active {
    color: #fff;
    background: linear-gradient(90deg, #3498db 0%, #5dade2 100%);
    font-weight: 500;
    border-left-color: #2980b9;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.menu-item .icon {
    margin-right: 12px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.menu-item:hover .icon,
.menu-item.active .icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* ========================================
   菜单分组样式
   ======================================== */

.menu-group {
    margin-bottom: 2px;
}

.menu-group-title {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: 1px;
    user-select: none;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-group-title:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.07);
}

.menu-group-title .icon {
    margin-right: 12px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.menu-group-title .text {
    flex: 1;
}

.group-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.group-arrow.open {
    transform: rotate(180deg);
}

.menu-group-items {
    display: none;
}

.menu-group-items.open {
    display: block;
}

.menu-group-items .menu-item {
    padding: 12px 24px 12px 48px;
    font-size: 15px;
}

.menu-group-items .menu-item .icon {
    font-size: 16px;
    width: 20px;
    height: 20px;
}

/* ========================================
   顶部栏样式
   ======================================== */

.header {
    height: 64px;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left .hamburger {
    display: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #333;
    transition: all 0.2s;
}

.header-left .hamburger:hover {
    background-color: #f5f7fa;
}

.header-title {
    font-size: 17px;
    font-weight: 500;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #333;
    font-size: 15px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.user-info:hover {
    background-color: #f5f7fa;
}

.user-info .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info:hover .avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

/* 用户下拉菜单 */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    padding: 6px 0;
    display: none;
    z-index: 1000;
    border: 1px solid #f0f0f0;
}

.user-menu.show {
    display: block;
}

.user-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    color: #374151;
    font-size: 15px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.user-menu-item:hover {
    background-color: #f5f7fa;
    color: #1890ff;
}

/* ========================================
   内容区样式
   ======================================== */

.content {
    flex: 1;
    padding: 24px;
}

/* 面包屑 */
.breadcrumb {
    margin-bottom: 20px;
    color: #666;
    font-size: 15px;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

/* 页面标题 */
.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1f2937;
}

/* 卡片容器 */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

/* ========================================
   按钮样式
   ======================================== */

.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.5;
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

/* 主按钮 */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border-color: #2980b9;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    font-size: 16px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}

/* 次按钮 */
.btn-default {
    background-color: #fff;
    color: #2c3e50;
    border-color: #bdc3c7;
    font-size: 16px;
}

.btn-default:hover {
    color: #3498db;
    border-color: #3498db;
    background-color: #f8f9fa;
}

/* 危险按钮 */
.btn-danger {
    background-color: #fff;
    color: #dc3545;
    border-color: #dc3545;
    font-size: 16px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* ========================================
   操作按钮统一风格（账号管理/租户管理通用）
   ======================================== */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-action:hover {
    border-color: #3498db;
    color: #3498db;
    background: #f0f7ff;
}

.btn-action.btn-edit {
    color: #3498db;
    border-color: #3498db;
    background: #fff;
}

.btn-action.btn-edit:hover {
    background: #3498db;
    color: #fff;
}

.btn-action.btn-toggle {
    color: #f39c12;
    border-color: #f39c12;
}

.btn-action.btn-toggle:hover {
    background: #f39c12;
    color: #fff;
}

.btn-action.btn-delete {
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-action.btn-delete:hover {
    background: #e74c3c;
    color: #fff;
}

/* 操作按钮容器 */
.action-btns {
    display: flex;
    gap: 6px;
    white-space: nowrap;
    align-items: center;
    flex-wrap: nowrap;
}

.action-btns .btn-action {
    flex-shrink: 0;
}

/* ========================================
   表格样式（优化版）
   ======================================== */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    table-layout: auto; /* 自适应布局，避免文字竖排 */
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    white-space: nowrap;
}

td {
    color: #4b5563;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 操作列特殊样式 */
td:last-child,
.action-cell {
    white-space: nowrap;
    min-width: 200px;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}

tr:hover {
    background-color: #f9fafb;
}

/* 租户LOGO缩略图 */
.tenant-logo-preview {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f5f5f5;
    overflow: hidden;
}

.tenant-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tenant-logo-preview i {
    font-size: 18px;
    color: #3498db;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.status-normal {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.status-disabled {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ========================================
   首页数据卡片
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover {
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
    border-color: #3498db;
}

.stat-card .title {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-card .number {
    font-size: 38px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-card .desc {
    font-size: 14px;
    color: #95a5a6;
}

/* 快捷入口 */
.quick-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-action-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: #2c3e50;
    border: 2px solid #e8e8e8;
    min-width: 140px;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.2);
    color: #3498db;
    border-color: #3498db;
    background-color: #f8f9fa;
}

.quick-action-card .icon {
    font-size: 38px;
    margin-bottom: 12px;
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-card:hover .icon {
    transform: scale(1.1);
    color: #2980b9;
}

.quick-action-card .text {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

/* ========================================
   占位页样式
   ======================================== */

.placeholder {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.placeholder .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder .title {
    font-size: 18px;
    margin-bottom: 12px;
    color: #666;
}

.placeholder .desc {
    font-size: 14px;
}

/* ========================================
   响应式
   ======================================== */

/* ========================================
   弹窗 Modal 样式
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
}

.modal-box {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.25s ease;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.modal-header-blue {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header-blue .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header-blue .modal-title i {
    font-size: 20px;
}

.modal-close-blue {
    cursor: pointer;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close-blue:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 0;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    flex-shrink: 0;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    color: #4b5563;
    font-weight: 500;
}

.form-input-wrap {
    position: relative;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
    font-family: inherit;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.form-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #3498db;
}

.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-strength-bar {
    display: flex;
    gap: 4px;
    flex: 1;
}

.password-strength-item {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background-color: #e5e7eb;
    transition: all 0.3s;
}

.password-strength-item.weak {
    background-color: #dc2626;
}

.password-strength-item.medium {
    background-color: #f59e0b;
}

.password-strength-item.strong {
    background-color: #22c55e;
}

.password-strength-text {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
}

#changePwdModal .form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

#changePwdModal .form-label {
    width: 90px;
    flex-shrink: 0;
    margin-bottom: 0;
    text-align: right;
}

#changePwdModal .form-input-wrap {
    flex: 1;
    min-width: 200px;
}

#changePwdModal .password-strength {
    width: calc(100% - 90px - 12px);
    margin-left: calc(90px + 12px);
    margin-top: 4px;
}

.btn-modal {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.btn-modal-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
}

.btn-modal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-modal-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
}

.btn-modal-secondary:hover {
    background-color: #e5e7eb;
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* 表单样式 */
.form-item {
    margin-bottom: 20px;
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #4b5563;
    font-weight: 500;
}

.form-required {
    color: #dc2626;
    margin-left: 4px;
}

.form-radio-group {
    display: flex;
    gap: 24px;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
    color: #4b5563;
}

.form-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-avatar-text {
    font-size: 14px;
    color: #6c757d;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s;
    font-family: inherit;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-item textarea {
    height: auto;
    min-height: 120px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.6;
}

.form-item input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ========================================
   Toast 提示样式
   ======================================== */

.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 9999;
    animation: toastSlideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.toast-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toast-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.toast-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   多端适配媒体查询
   ======================================== */

/* ========== 平板端适配 (769px - 1024px) ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-logo {
        padding: 0;
    }
    .sidebar-logo span {
        display: none;
    }
    .sidebar-logo i {
        font-size: 22px;
    }
    .menu-item .text {
        display: none;
    }
    .menu-item .icon {
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }
    .main {
        margin-left: 60px;
    }
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .page-title {
        font-size: 22px;
    }
    .header-left .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ========== 手机端适配 (≤768px) ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 2000;
        transition: transform 0.3s ease;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1900;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .main {
        margin-left: 0;
    }
    .header {
        padding: 0 12px;
    }
    .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .header-left .hamburger {
        font-size: 20px;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }
    .header-left .hamburger:hover {
        background-color: #f5f7fa;
    }
    .header-title {
        font-size: 18px;
    }
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .card {
        padding: 16px;
    }
    .card-value {
        font-size: 28px;
    }
    .card-label {
        font-size: 13px;
    }
    .page-title {
        font-size: 20px;
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    .content {
        padding: 12px 16px;
    }
    .btn, .btn-primary, .btn-danger {
        padding: 10px 16px;
        font-size: 15px;
    }
    .search-wrap {
        padding: 12px 16px;
        gap: 12px;
    }
    .modal-box {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
        max-width: 100vw;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    .modal-header {
        flex-shrink: 0;
    }
    .modal-body {
        flex: 1;
        overflow-y: auto;
    }
    .modal-footer {
        flex-shrink: 0;
        padding: 16px 20px;
    }
    .modal-footer .btn {
        flex: 1;
        margin-right: 8px;
    }
    .modal-footer .btn:last-child {
        margin-right: 0;
    }
}

/* ========================================
   响应式
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-logo {
        font-size: 12px;
        padding: 0 4px;
    }
    
    .menu-item {
        justify-content: center;
        padding: 12px 8px;
    }
    
    .menu-item .text {
        display: none;
    }
    
    .menu-item .icon {
        margin-right: 0;
    }
    
    .main {
        margin-left: 60px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-box {
        width: 95vw !important;
        padding: 20px;
    }
}

/* 所有弹窗里的form样式统一，防止其他页面CSS覆盖 */
.modal .form-label {
    display: block !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    float: none !important;
    width: auto !important;
    text-align: left !important;
    font-size: 15px !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
}
.modal .form-input-wrap {
    clear: both !important;
    display: block !important;
    width: 100% !important;
    position: relative !important;
}
.modal .form-group {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    float: none !important;
}
.modal .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
}
.modal .form-row .form-group {
    margin-bottom: 0 !important;
}
.modal .form-input {
    width: 100% !important;
    height: 44px !important;
    padding: 0 14px 0 40px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
}
.modal .form-input-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: 16px !important;
}
