* {
            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, #f8fafc 0%, #f1f5f9 100%);
            color: #334155;
            line-height: 1.6;
            min-height: 100vh;
            margin: 0;
            padding: 0;
            position: relative;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: 
                radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 40% 60%, rgba(239, 68, 68, 0.02) 0%, transparent 50%);
            pointer-events: none;
            z-index: -1;
        }

        /* ===== 多级区域权限树样式（同步） ===== */
        .area-tree-container { border:1px solid #e2e8f0; background:#fff; max-height:260px; overflow:auto; padding:8px 10px; border-radius:6px; font-size:13px; }
        .area-tree-container ul { list-style:none; margin:0; padding-left:14px; }
        .area-tree-container li { margin:2px 0; line-height:18px; position:relative; }
        .area-tree-label { cursor:pointer; user-select:none; }
        .area-tree-branch > .area-tree-label { font-weight:600; color:#334155; }
        .area-tree-toggle { cursor:pointer; display:inline-block; width:12px; text-align:center; margin-right:4px; color:#64748b; }
        .area-tree-toggle:hover { color:#0f172a; }
        .area-tree-toolbar { margin-top:6px; display:flex; gap:8px; flex-wrap:wrap; }
        .area-tree-toolbar button { background:#f1f5f9; border:1px solid #cbd5e1; padding:2px 8px; font-size:12px; border-radius:4px; cursor:pointer; }
        .area-tree-toolbar button:hover { background:#e2e8f0; }

        /* 顶部导航栏 */
        .navbar {
            background: #fff;
            border-bottom: 1px solid #e1e5e9;
            color: #2c3e50;
            padding: 0 24px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .navbar-brand {
            font-size: 1.5rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            color: #2c3e50;
        }

        .navbar-brand .logo {
            font-size: 1.8rem;
            margin-right: 8px;
            color: #3498db;
        }

        .navbar-user {
            display: flex;
            align-items: center;
            gap: 20px;
            position: relative;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 8px;
            transition: background-color 0.2s ease;
        }
        
        .navbar-user:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #3498db;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .user-dropdown {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            min-width: 200px;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }
        
        .user-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            color: #2c3e50;
            cursor: pointer;
            transition: background-color 0.2s ease;
            border-radius: 6px;
            margin: 4px;
        }
        
        .dropdown-item:hover {
            background-color: #f8f9fa;
        }
        
        .dropdown-item:last-child {
            color: #e74c3c;
        }
        
        .dropdown-item:last-child:hover {
            background-color: #fee;
        }
        
        .dropdown-divider {
            height: 1px;
            background-color: #eee;
            margin: 8px 0;
        }

        .user-avatar:hover {
            background: #2980b9;
        }

        /* 侧边栏 */
        .sidebar {
            position: fixed;
            top: 60px;
            left: 0;
            width: 260px;
            height: calc(100vh - 60px);
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border-right: 2px solid #e2e8f0;
            overflow-y: auto;
            z-index: 999;
            transition: all 0.3s ease;
            box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
        }

        .sidebar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
        }

        .sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 3px;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
            border-radius: 3px;
        }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
        }

        .sidebar-menu {
            padding: 20px 0;
        }

.menu-item {
            display: flex;
            align-items: center;
            padding: 14px 24px;
            color: #64748b;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            margin: 2px 12px;
            border-radius: 12px;
            font-weight: 500;
            font-size: 14px;
            overflow: hidden;
        }

        .menu-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 4px;
            height: 100%;
            background: #3b82f6;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }

        .menu-item:hover {
            color: #1e293b;
            background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
            transform: translateX(4px);
        }

        .menu-item:hover::before {
            transform: translateX(0);
        }

        .menu-item.active {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1e40af;
            font-weight: 600;
            box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
        }

        .menu-item.active::before {
            transform: translateX(0);
        }

        .menu-item span {
            margin-right: 12px;
            font-size: 16px;
            width: 20px;
            text-align: center;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
        }

        .menu-item:hover span {
            transform: scale(1.1);
        }

        .menu-item-text {
            flex: 1;
            font-weight: 500;
        }

        /* 主内容区域 */
        .main-content {
            margin-left: 260px;
            margin-top: 60px;
            padding: 0;
            min-height: calc(100vh - 60px);
            background: transparent;
            position: relative;
            overflow-x: auto;
        }

        /* 面包屑导航 */
        .breadcrumb-nav {
            background: #fff;
            border-bottom: 1px solid #e1e5e9;
            padding: 16px 24px;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            font-size: 14px;
        }

        .breadcrumb-item {
            display: flex;
            align-items: center;
            color: #6c757d;
            padding: 6px 12px;
            background: #f8f9fa;
            border-radius: 4px;
            margin-right: 8px;
            font-weight: 500;
        }

        .breadcrumb-item:hover {
            background: #e9ecef;
        }

        .breadcrumb-item:not(:last-child)::after {
            content: '›';
            margin: 0 8px;
            color: #adb5bd;
            font-weight: normal;
        }

        .breadcrumb-item.active {
            background: #3498db;
            color: #fff;
        }

        /* 内容容器 */
        .content-container {
            padding: 24px;
        }

        /* 页面标题 */
        .page-header {
            background: #fff;
            border: 1px solid #e1e5e9;
            border-radius: 8px;
            padding: 20px 24px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        @keyframes shimmerHeader {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .page-header::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 120px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.08));
            pointer-events: none;
        }

        .page-header-content {
            flex: 1;
            z-index: 1;
        }

        .page-title {
            font-size: 1.75rem;
            color: #2c3e50;
            margin-bottom: 8px;
            font-weight: 600;
            line-height: 1.3;
        }

        .page-description {
            color: #6c757d;
            font-size: 0.9rem;
            line-height: 1.4;
            font-weight: 400;
            max-width: 600px;
        }

        .page-header .btn {
            margin-left: 20px;
            z-index: 1;
        }

        /* 内容区域 */
        .content-section {
            display: none;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 20px;
            min-height: calc(100vh - 120px);
        }

        .content-section.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        .content-section.entering {
            animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 卡片样式 */
        .card {
            background: #fff;
            border: 1px solid #e1e5e9;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
            transition: all 0.2s ease;
        }

        .card:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid #e1e5e9;
            flex-wrap: wrap;
            gap: 16px;
        }

        .card-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .card-title {
            font-size: 1.25rem;
            color: #2c3e50;
            margin: 0;
            display: flex;
            align-items: center;
            flex: 1;
            font-weight: 600;
        }

        .card-title .icon {
            margin-right: 8px;
            font-size: 1.2rem;
            color: #3498db;
        }

        .card-actions {
            display: flex;
            gap: 8px;
        }

        /* 表单样式 */
        #order-list .card-actions {
            width: 100%;
            align-items: flex-start;
            flex-direction: column;
        }

        .order-filter-row {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            flex-wrap: nowrap;
        }

        .order-filter-row .search-box {
            flex: 1 1 260px;
            min-width: 220px;
        }

        .order-filter-row .search-box input {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .order-filter-row .form-control {
            flex: 0 0 150px;
        }

        .order-filter-row .btn {
            flex: 0 0 auto;
            white-space: nowrap;
        }

        .order-community-filter-row {
            display: grid;
            grid-template-columns: repeat(4, minmax(140px, 1fr));
            gap: 10px;
            width: 100%;
        }

        .community-stats-action-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
            flex-wrap: nowrap;
        }

        .vehicle-license-expiring {
            background: #fee2e2 !important;
        }

        .vehicle-license-expiring td {
            color: #991b1b;
        }

        .vehicle-license-link {
            color: #2563eb;
            font-weight: 600;
            text-decoration: none;
        }

        .vehicle-license-link:hover {
            text-decoration: underline;
        }

        .vehicle-license-thumb {
            display: block;
            width: 112px;
            height: 76px;
            object-fit: cover;
            border: 1px solid #dbe3ef;
            border-radius: 6px;
            cursor: pointer;
            background: #f8fafc;
        }

        .vehicle-license-preview-wrap {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-top: 8px;
        }

        .vehicle-license-preview-actions {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .vehicle-license-preview-note {
            margin-top: 6px;
            font-size: 12px;
            color: #64748b;
        }

        .vehicle-license-alert-mask,
        .vehicle-image-preview-mask {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.45);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }

        .vehicle-license-alert-card {
            width: min(560px, 92vw);
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
            overflow-x: hidden;
            overflow-y: auto;
        }

        .vehicle-license-alert-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 18px 22px;
            border-bottom: 1px solid #e5e7eb;
        }

        .vehicle-license-alert-icon {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: #fee2e2;
            color: #dc2626;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
        }

        .vehicle-license-alert-title {
            margin: 0;
            font-size: 18px;
            color: #111827;
        }

        .vehicle-license-alert-body {
            padding: 16px 22px 4px;
            max-height: 360px;
            overflow: auto;
        }

        .vehicle-license-alert-item {
            padding: 10px 0;
            border-bottom: 1px solid #f1f5f9;
            color: #374151;
            line-height: 1.55;
        }

        .vehicle-license-alert-item strong {
            color: #b91c1c;
        }

        .vehicle-license-alert-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 16px 22px 20px;
        }

        .vehicle-image-preview-card {
            position: relative;
            max-width: min(86vw, 920px);
            max-height: 86vh;
            background: #fff;
            border-radius: 8px;
            padding: 12px;
            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
        }

        .vehicle-image-preview-card img {
            display: block;
            max-width: calc(86vw - 24px);
            max-height: calc(86vh - 24px);
            object-fit: contain;
        }

        .vehicle-image-preview-close {
            position: absolute;
            right: -12px;
            top: -12px;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 0;
            background: #111827;
            color: #fff;
            cursor: pointer;
            font-size: 18px;
            line-height: 30px;
        }

        .form-row {
            display: flex;
            gap: 16px;
            margin-bottom: 16px;
        }

        .form-group {
            flex: 1;
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #374151;
            font-size: 0.875rem;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .form-group label .icon {
            font-size: 0.875rem;
            color: #6b7280;
        }

        .form-group label .required {
            color: #dc2626;
            margin-left: 2px;
        }

        .form-control {
            width: 100%;
            padding: 12px 16px;
            border: 1.5px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.2s ease;
            background: #fff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .form-control:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            background: #fefefe;
        }

        .form-control:hover {
            border-color: #d1d5db;
        }

        .form-control::placeholder {
            color: #9ca3af;
            font-style: italic;
        }

        select.form-control {
            cursor: pointer;
            background-image: none;
            padding-right: 16px;
            -webkit-appearance: auto;
            -moz-appearance: auto;
            appearance: auto;
        }

        select.form-control:focus {
            background-image: none;
        }

        textarea.form-control {
            resize: vertical;
            min-height: 80px;
            font-family: inherit;
        }

        input[type="date"],
        input[type="date"].form-control {
            cursor: pointer;
        }

        input[type="date"]::-webkit-calendar-picker-indicator {
            position: static;
            width: auto;
            height: auto;
            margin: 0;
            padding: 0;
            opacity: 1;
            cursor: pointer;
        }

        input[type="date"]::-webkit-datetime-edit,
        input[type="date"]::-webkit-datetime-edit-fields-wrapper,
        input[type="date"]::-webkit-datetime-edit-text,
        input[type="date"]::-webkit-datetime-edit-month-field,
        input[type="date"]::-webkit-datetime-edit-day-field,
        input[type="date"]::-webkit-datetime-edit-year-field {
            cursor: pointer;
        }

        .form-help {
            font-size: 0.75rem;
            color: #6b7280;
            margin-top: 4px;
            font-style: italic;
        }

        .form-group.full-width {
            flex: 1 1 100%;
        }

        /* Scoped overrides for 区域管理 - 新增/编辑表单: 确保输入框、下拉与按钮在白底/浅色背景主题下可见 */
        #area-form .form-control {
            background-color: #ffffff !important;
            color: #111827 !important; /* 深色文字以保证对比 */
            border-color: #e5e7eb !important;
        }

        #area-form select.form-control {
            background-color: #ffffff !important;
            background-image: none !important;
            padding-right: 16px !important;
            -webkit-appearance: auto !important;
            -moz-appearance: auto !important;
            appearance: auto !important;
        }

        #area-form .btn {
            color: #111827 !important;
        }

        #area-form .btn-primary {
            background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%) !important;
            color: #ffffff !important;
            border: 1px solid #1e40af !important;
        }

        #area-form .btn-light {
            background: #f8f9fa !important;
            color: #495057 !important;
            border: 1px solid #dee2e6 !important;
        }

        #area-form.area-form-modal {
            position: fixed;
            inset: 0;
            z-index: 1100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: rgba(0, 0, 0, 0.52);
            backdrop-filter: blur(4px);
            overflow: auto;
        }

        #area-form.area-form-modal .page-header {
            display: none !important;
        }

        #area-form.area-form-modal .area-form-modal-content {
            width: min(920px, 100%);
            max-height: calc(100vh - 48px);
            margin: 0 auto;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 24px;
            row-gap: 16px;
            overflow-x: hidden;
            overflow-y: auto;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
        }

        #area-form.area-form-modal .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            grid-column: 1 / -1;
            flex-shrink: 0;
            padding: 20px 25px;
            margin: 0;
            border-bottom: none;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
        }

        #area-form.area-form-modal .modal-header h3 {
            margin: 0;
            color: #fff;
            font-size: 1.35rem;
            font-weight: 700;
        }

        #area-form.area-form-modal .modal-header .close {
            width: 38px;
            height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.22);
            color: #fff;
            font-size: 28px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            transition: background 0.2s ease, transform 0.2s ease;
        }

        #area-form.area-form-modal .modal-header .close:hover {
            background: rgba(255, 255, 255, 0.34);
            transform: scale(1.04);
        }

        #area-form.area-form-modal .area-form-modal-content > .info-box,
        #area-form.area-form-modal .area-form-modal-content > .form-row,
        #area-form.area-form-modal .area-form-modal-content > #areaFormResult {
            margin-left: 25px;
            margin-right: 25px;
        }

        #area-form.area-form-modal .area-form-modal-content > .info-box {
            grid-column: 1 / -1;
            margin-top: 20px;
            margin-bottom: 0;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row {
            display: contents;
            margin: 0;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row .form-group {
            min-width: 0;
            margin: 0;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row .form-group:nth-child(odd) {
            margin-left: 25px;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row .form-group:nth-child(even) {
            margin-right: 25px;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row:nth-of-type(4) .form-group:nth-child(2) {
            grid-row: span 2;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row:nth-of-type(5) .form-group:nth-child(2) {
            grid-column: 1 / -1;
            margin-left: 25px;
            margin-right: 25px;
        }

        #area-form.area-form-modal .area-form-modal-content > .form-row:last-of-type {
            display: flex;
            grid-column: 1 / -1;
            justify-content: flex-end;
            margin: 0;
            padding: 18px 25px;
            border-top: 1px solid #eef2f7;
            background: #f8fafc;
        }

        #area-form.area-form-modal .area-parent-cascade {
            display: grid;
            gap: 10px;
        }

        #area-form.area-form-modal .area-parent-level {
            display: grid;
            gap: 6px;
        }

        #area-form.area-form-modal .area-parent-level-label {
            color: #64748b;
            font-size: 12px;
            font-weight: 700;
        }

        #area-form.area-form-modal #areaFormResult {
            grid-column: 1 / -1;
            margin-bottom: 20px;
        }

        @media (max-width: 760px) {
            #area-form.area-form-modal .area-form-modal-content {
                grid-template-columns: 1fr;
            }

            #area-form.area-form-modal .area-form-modal-content > .form-row:nth-of-type(4) .form-group:nth-child(2),
            #area-form.area-form-modal .area-form-modal-content > .form-row:nth-of-type(5) .form-group:nth-child(2) {
                grid-column: auto;
                grid-row: auto;
            }
        }

        /* 按钮样式 */
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-right: 8px;
            margin-bottom: 8px;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            line-height: 1.5;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.5s ease;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            color: white;
            border: 1px solid #3b82f6;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
        }

        .btn-secondary {
            background: #f8f9fa;
            color: #6c757d;
            border: 1px solid #e5e7eb;
        }

        .btn-secondary:hover {
            background: #e9ecef;
            color: #495057;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .btn-success {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border: 1px solid #10b981;
        }

        .btn-success:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
        }

        .btn-danger {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
            border: 1px solid #ef4444;
        }

        .btn-danger:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
        }

        .btn-info {
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
            color: white;
            border: 1px solid #06b6d4;
        }

        .btn-info:hover {
            background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
        }

        .btn-light {
            background: #f8f9fa;
            color: #495057;
            border: 1px solid #dee2e6;
        }

        .btn-light:hover {
            background: #e9ecef;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* 小尺寸按钮 */
        .btn-sm {
            padding: 6px 12px;
            font-size: 12px;
        }

        /* 结果显示区域 */
        .result-panel {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
            min-height: 120px;
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 13px;
            white-space: pre-wrap;
            overflow-x: auto;
        }

        /* 用户列表表格样式 */
        .user-table-wrapper{ 
            margin-top:12px; 
            border:1px solid #e2e8f0; 
            border-radius:10px; 
            overflow:hidden; 
            background:#ffffff; 
            box-shadow:0 4px 12px rgba(0,0,0,0.05); 
            position:relative;
        }
        .user-table-wrapper::after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:0 1px 0 #f1f5f9 inset;}
        .user-table {
            width: 100%;
            border-collapse: separate;
            border-spacing:0;
            font-size:13px;
        }

        .user-table th,
        .user-table td {
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid #f1f5f9;
            vertical-align: middle;
        }

        .user-table thead th {
            background: #f8fafc;
            font-weight:600;
            font-size:12px;
            color:#475569;
            position:sticky;top:0;z-index:2;
        }

    .user-table thead th:first-child {width:34px;}

    .user-table tbody tr { transition: background .18s ease; }

    .user-table tbody tr:nth-child(even) { background:#f8fafc; }

    .user-table tbody tr:hover { background:#eef6ff; }
        
        .tree-display {
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.9) 0%, 
                rgba(248, 250, 252, 0.9) 100%);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 16px;
            padding: 25px;
            margin: 15px 0;
            font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
            line-height: 1.8;
            white-space: pre-wrap;
            overflow-x: auto;
            color: #374151;
            min-height: 120px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
        }

        .tree-display:hover {
            box-shadow: 0 15px 35px rgba(0,0,0,0.12);
            transform: translateY(-2px);
        }
        
        .tree-display:empty::before {
            content: '📭 没有数据可显示';
            color: #9ca3af;
            font-style: italic;
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 80px;
        }

        .user-status {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            border: 2px solid;
            transition: all 0.3s ease;
        }

        .status-active {
            background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
            color: #155724;
            border-color: #b6d7ba;
            box-shadow: 0 4px 15px rgba(21, 87, 36, 0.2);
        }

        .status-inactive {
            background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
            color: #721c24;
            border-color: #f5a9af;
            box-shadow: 0 4px 15px rgba(114, 28, 36, 0.2);
        }

        .user-role {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 800;
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            color: #1565c0;
            border: 2px solid #90caf9;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            box-shadow: 0 4px 15px rgba(21, 101, 192, 0.2);
            transition: all 0.3s ease;
        }

        /* 表格内徽章：防止换行并节省水平空间，避免列错位 */
        .user-table td .user-role,
        .user-table td .user-status {
            display: inline-flex;
            align-items: center;
            white-space: nowrap;
            padding: 6px 10px !important;
            border-radius: 14px !important;
            font-size: 11px !important;
            letter-spacing: 0.6px !important;
            box-sizing: border-box;
            vertical-align: middle;
        }

        /* 区域列表列宽与防换行：增加区域ID、区域类型和父级区域列的最小宽度，防止标题换行并显示省略号 */
        .user-table thead th:nth-child(1),
        .user-table td:nth-child(1) {
            min-width: 90px; /* 区域ID 列 */
            white-space: nowrap;
        }

        .user-table thead th:nth-child(4),
        .user-table td:nth-child(4) {
            min-width: 110px; /* 区域类型 列 */
            white-space: nowrap;
        }

        .user-table thead th:nth-child(5),
        .user-table td:nth-child(5) {
            min-width: 160px; /* 父级区域 列 */
            max-width: 420px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-actions {
            display: flex;
            gap: 10px;
        }

        .action-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 800;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
        }

        .action-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            transition: left 0.5s ease;
        }

        .action-btn:hover::before {
            left: 100%;
        }

        .btn-edit {
            background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
            color: #212529;
            box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
        }

        .btn-edit:hover {
            background: linear-gradient(135deg, #ffb300 0%, #ffa000 100%);
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
        }

        .btn-delete {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            color: white;
            box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
        }

        .btn-delete:hover {
            background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(220, 53, 69, 0.4);
        }

        .no-data {
            text-align: center;
            color: #9ca3af;
            font-style: italic;
            padding: 80px 30px;
            background: linear-gradient(135deg, 
                rgba(248, 250, 252, 0.9) 0%, 
                rgba(241, 245, 249, 0.9) 100%);
            backdrop-filter: blur(15px);
            border-radius: 16px;
            border: 2px dashed rgba(156, 163, 175, 0.5);
            transition: all 0.3s ease;
        }

        .no-data:hover {
            background: linear-gradient(135deg, 
                rgba(241, 245, 249, 0.9) 0%, 
                rgba(226, 232, 240, 0.9) 100%);
            border-color: rgba(156, 163, 175, 0.7);
        }

        .no-data::before {
            content: "📋";
            display: block;
            font-size: 4rem;
            margin-bottom: 20px;
            filter: grayscale(0.3);
        }

        .table-container {
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.95) 0%, 
                rgba(255,255,255,0.9) 100%);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 16px;
            padding: 25px;
            margin-top: 20px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }

        .table-container:hover {
            transform: translateY(-3px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.12);
        }

        /* 状态样式 */
        .success {
            color: #22c55e;
            font-weight: 700;
            text-shadow: 0 1px 2px rgba(34, 197, 94, 0.2);
        }

        .error {
            color: #ef4444;
            font-weight: 700;
            text-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
        }

        .loading {
            color: #3b82f6;
            font-style: italic;
            font-weight: 600;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        /* 表格样式 */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 16px;
            background: #fff;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border: none;
        }

        .data-table th,
        .data-table td {
            padding: 14px 12px;
            text-align: left;
            border-bottom: 1px solid #f1f5f9;
        }

        .data-table th {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            font-weight: 600;
            color: #475569;
            border-bottom: 2px solid #e2e8f0;
            font-size: 14px;
            position: relative;
        }

        .data-table th::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: #3b82f6;
            transition: width 0.3s ease;
        }

        .data-table th:hover::after {
            width: 100%;
        }

        .data-table td {
            color: #64748b;
            font-size: 14px;
        }

        .data-table tbody tr {
            transition: all 0.2s ease;
        }

        .data-table tbody tr:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            transform: scale(1.001);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }

        /* 状态标签 & 地址省略 */
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
            text-align: center;
            min-width: 60px;
            display: inline-block;
        }
        .addr-ellipsis { 
            display:inline-block; 
            max-width:220px; 
            white-space:nowrap; 
            overflow:hidden; 
            text-overflow:ellipsis; 
            vertical-align:middle; 
        }

        .status-active {
            background: #dcfce7;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .status-inactive {
            background: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        .status-pending {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }

        .status-completed {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #bfdbfe;
        }

        .status-pending {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }

        .status-assigned {
            background: #e0e7ff;
            color: #3730a3;
            border: 1px solid #c7d2fe;
        }

        .status-in_progress {
            background: #dcfce7;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .status-cancelled {
            background: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        /* 统计卡片 */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: #fff;
            border: 1px solid #e1e5e9;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.04);
            text-align: center;
            transition: all 0.2s ease;
        }

        .stat-card:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
        }

        .stat-card h3 {
            font-size: 1.75rem;
            margin: 0 0 8px 0;
            font-weight: 600;
            color: #2c3e50;
        }

        .stat-card p {
            color: #6c757d;
            margin: 0;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .stat-icon {
            font-size: 2rem;
            margin-bottom: 12px;
            color: #3498db;
        }

        /* 响应式设计 */
        @media (max-width: 1200px) {
            .sidebar {
                width: 280px;
            }
            
            .main-content {
                margin-left: 280px;
            }

            .page-title {
                font-size: 2.2rem;
            }

            .content-container {
                padding: 25px;
            }
            
            /* 模态框响应式 */
            .modal-content {
                max-width: 500px;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                height: 65px;
                padding: 0 20px;
            }

            .navbar-brand {
                font-size: 1.4rem;
            }

            .navbar-brand .logo {
                font-size: 1.8rem;
            }

            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                width: 300px;
                z-index: 1001;
                border-radius: 0;
                top: 65px;
                height: calc(100vh - 65px);
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
                margin-top: 65px;
                padding: 0;
            }

            .content-container {
                padding: 20px;
            }

            .page-header {
                padding: 25px 20px;
                margin-bottom: 25px;
                flex-direction: column;
                align-items: flex-start;
                gap: 20px;
            }

            .page-title {
                font-size: 1.8rem;
            }

            .page-description {
                font-size: 0.95rem;
            }

            .form-row {
                flex-direction: column;
                gap: 0;
            }

            .card {
                padding: 25px 20px;
                margin-bottom: 20px;
                border-radius: 16px;
            }

            .card-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
                margin-bottom: 20px;
            }

            .card-title {
                font-size: 1.3rem;
            }

            .btn {
                padding: 12px 20px;
                font-size: 13px;
                margin-right: 8px;
                margin-bottom: 8px;
            }

            .stats-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .stat-card {
                padding: 25px 20px;
            }

            .stat-icon {
                font-size: 2.5rem;
                padding: 15px;
            }

            .stat-info h3 {
                font-size: 1.8rem;
            }

            .breadcrumb-nav {
                padding: 15px 20px;
            }

            .breadcrumb-item {
                padding: 8px 14px;
                font-size: 13px;
                margin-right: 8px;
            }

            /* 移动端菜单按钮 */
            .mobile-menu-btn {
                display: block;
                background: none;
                border: none;
                color: white;
                font-size: 1.6rem;
                cursor: pointer;
                padding: 8px;
                border-radius: 8px;
                transition: all 0.3s ease;
            }

            .mobile-menu-btn:hover {
                background: rgba(255,255,255,0.1);
            }

            /* 遮罩层 */
            .sidebar-overlay {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.6);
                backdrop-filter: blur(5px);
                display: none;
                z-index: 1000;
                transition: all 0.3s ease;
            }

            .sidebar-overlay.active {
                display: block;
            }

            .user-table {
                font-size: 13px;
            }

            .user-table th,
            .user-table td {
                padding: 12px 8px;
            }

            .action-btn {
                padding: 6px 10px;
                font-size: 10px;
            }

            .result-panel {
                padding: 20px 15px;
                font-size: 13px;
                min-height: 100px;
            }

            .tree-display {
                padding: 20px 15px;
                font-size: 13px;
                line-height: 1.6;
            }
            
            /* 移动端模态框 */
            .modal {
                padding: 10px;
            }
            
            .modal-content {
                max-width: none;
                width: 100%;
                max-height: calc(100vh - 20px);
                border-radius: 8px;
            }
            
            .modal-header {
                padding: 16px 20px 12px;
            }
            
            .modal-header h3 {
                font-size: 1.1rem;
            }
            
            .modal-body {
                padding: 20px;
            }
            
            .modal-footer {
                padding: 12px 20px;
            }
        }

        @media (min-width: 769px) {
            .mobile-menu-btn {
                display: none;
            }
        }

        /* 移动端菜单按钮样式 */
        .mobile-menu-btn {
            display: none;
        }

        /* 动画效果 */
        .fade-in {
            animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        @keyframes fadeIn {
            from { 
                opacity: 0; 
                transform: translateY(30px); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0); 
            }
        }

        /* 页面加载动画 */
        .page-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            opacity: 1;
            transition: opacity 0.5s ease;
        }

        .page-loader.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .loader-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(255,255,255,0.3);
            border-top: 4px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(40px) scale(0.98);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* 微交互动画 */
        .interactive-element {
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .interactive-element:hover {
            transform: translateY(-2px);
        }

        .interactive-element:active {
            transform: translateY(1px);
        }

        /* 分隔线 */
        .divider {
            height: 1px;
            background: linear-gradient(90deg, 
                transparent, 
                rgba(0,0,0,0.1), 
                transparent);
            margin: 30px 0;
            position: relative;
        }

        .divider::before {
            content: '';
            position: absolute;
            top: -1px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
        }

        /* 提示信息 */
        .info-box {
            background: linear-gradient(135deg, 
                rgba(227, 243, 255, 0.9) 0%, 
                rgba(179, 215, 255, 0.9) 100%);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(179, 215, 255, 0.5);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 25px;
            color: #0066cc;
            box-shadow: 0 8px 25px rgba(0, 102, 204, 0.1);
            transition: all 0.3s ease;
        }

        .info-box:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 35px rgba(0, 102, 204, 0.15);
        }

        .info-box .icon {
            margin-right: 12px;
            font-size: 18px;
        }

        /* 区域层次结构增强样式 */
        .tree-container {
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.95) 0%, 
                rgba(255,255,255,0.9) 100%);
            backdrop-filter: blur(25px);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 20px;
            padding: 35px;
            margin-bottom: 30px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1);
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            position: relative;
            overflow: hidden;
        }

        .tree-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
            background-size: 200% 100%;
            animation: shimmerTreeContainer 3s ease-in-out infinite;
        }

        @keyframes shimmerTreeContainer {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .tree-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 50px rgba(0,0,0,0.15);
        }

        .tree-search-bar {
            position: relative;
            margin-bottom: 25px;
        }

        .tree-search-input {
            width: 100%;
            padding: 16px 50px 16px 20px;
            border: 2px solid rgba(0,0,0,0.08);
            border-radius: 14px;
            font-size: 15px;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(10px);
            font-weight: 500;
        }

        .tree-search-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
            background: rgba(255,255,255,1);
            transform: translateY(-2px);
        }

        .tree-search-input::placeholder {
            color: #9ca3af;
            font-weight: 400;
        }

        .tree-search-icon {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: #667eea;
            font-size: 20px;
            transition: all 0.3s ease;
        }

        .tree-search-input:focus + .tree-search-icon {
            color: #764ba2;
            transform: translateY(-50%) scale(1.1);
        }

        .tree-filters {
            display: flex;
            gap: 18px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }

        .filter-chip {
            padding: 10px 20px;
            background: linear-gradient(135deg, 
                rgba(248, 250, 252, 0.9) 0%, 
                rgba(241, 245, 249, 0.9) 100%);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(226, 232, 240, 0.8);
            border-radius: 25px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .filter-chip:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
        }

        .filter-chip.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
            user-select: none;
        }

        .tree-view {
            background: #fafbfc;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 20px;
            min-height: 400px;
            font-family: 'Consolas', 'Monaco', monospace;
            overflow-x: auto;
        }

        .tree-node {
            margin: 8px 0;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 6px;
            transition: all 0.2s ease;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .tree-node:hover {
            background: #e3f2fd;
        }

        .tree-node.selected {
            background: #667eea;
            color: white;
        }

        .tree-node.highlighted {
            background: #fff3cd;
            border: 2px solid #ffc107;
        }

        .tree-node-content {
            display: flex;
            align-items: center;
            flex: 1;
        }

        .tree-node-icon {
            margin-right: 8px;
            font-size: 16px;
            width: 20px;
            text-align: center;
        }

        .tree-node-text {
            flex: 1;
        }

        /* 现代化滚动条样式 */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.05);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, #667eea, #764ba2);
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #5a67d8, #6b5b95);
        }

        /* 选择高亮色彩 */
        ::selection {
            background: rgba(102, 126, 234, 0.3);
            color: #333;
        }

        ::-moz-selection {
            background: rgba(102, 126, 234, 0.3);
            color: #333;
        }

        /* 现代化加载状态 */
        .loading-skeleton {
            background: linear-gradient(90deg, 
                rgba(0,0,0,0.05) 25%, 
                rgba(0,0,0,0.1) 50%, 
                rgba(0,0,0,0.05) 75%);
            background-size: 200% 100%;
            animation: loading-shimmer 1.5s infinite;
        }

        @keyframes loading-shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }

        /* 现代化徽章样式 */
        .badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-radius: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        /* 角色管理样式 */
        .permission-grid {
            display: block;
            gap: 15px;
            margin-top: 15px;
            padding: 20px;
            background: linear-gradient(135deg, 
                rgba(248, 250, 252, 0.9) 0%, 
                rgba(241, 245, 249, 0.9) 100%);
            border-radius: 12px;
            border: 1px solid rgba(226, 232, 240, 0.8);
        }

        .role-permission-picker {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .role-permission-toolbar,
        .role-list-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            padding: 12px;
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid rgba(226, 232, 240, 0.9);
            border-radius: 10px;
        }

        .role-permission-search,
        .role-list-search {
            flex: 1 1 260px;
            min-width: 180px;
        }

        .role-permission-search input,
        .role-list-search,
        .role-list-status {
            width: 100%;
            min-height: 38px;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #fff;
            color: #334155;
            font-size: 14px;
        }

        .role-list-status {
            flex: 0 0 120px;
            width: auto;
        }

        .role-permission-filter {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: #475569;
            font-size: 13px;
            white-space: nowrap;
        }

        .role-permission-action {
            min-height: 34px;
            padding: 7px 11px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #fff;
            color: #334155;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .role-permission-action:hover {
            border-color: #667eea;
            color: #4f46e5;
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.12);
        }

        .role-permission-action.danger:hover {
            border-color: #ef4444;
            color: #dc2626;
        }

        .role-permission-summary,
        .role-list-count {
            color: #64748b;
            font-size: 13px;
            font-weight: 600;
        }

        .role-permission-tree-body {
            max-height: 460px;
            overflow: auto;
            padding: 10px;
            background: #fff;
            border: 1px solid rgba(226, 232, 240, 0.8);
            border-radius: 10px;
        }

        .role-permission-node {
            margin: 0;
        }

        .role-permission-node-row {
            display: grid;
            grid-template-columns: 26px minmax(0, 1fr) auto auto;
            align-items: center;
            gap: 8px;
            min-height: 36px;
            padding: 6px 8px;
            border-radius: 8px;
            transition: background 0.2s ease;
        }

        .role-permission-tree-body > .role-permission-node {
            display: grid;
            grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
            gap: 14px;
            padding: 14px;
            margin-bottom: 10px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            background: #fff;
        }

        .role-permission-tree-body > .role-permission-node:last-child {
            margin-bottom: 0;
        }

        .role-permission-tree-body > .role-permission-node > .role-permission-node-row {
            align-self: start;
            position: sticky;
            left: 0;
            grid-template-columns: 26px minmax(0, 1fr) auto;
            min-height: 44px;
            padding: 8px 10px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
        }

        .role-permission-tree-body > .role-permission-node > .role-permission-node-row .role-permission-count {
            grid-column: 3;
        }

        .role-permission-tree-body > .role-permission-node > .role-permission-node-row .role-permission-type {
            display: none;
        }

        .role-permission-node-row:hover {
            background: rgba(102, 126, 234, 0.08);
        }

        .role-permission-toggle,
        .role-permission-toggle-placeholder {
            width: 24px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .role-permission-toggle {
            border: 0;
            border-radius: 6px;
            background: rgba(226, 232, 240, 0.85);
            color: #475569;
            cursor: pointer;
            font-weight: 800;
            line-height: 1;
        }

        .role-permission-node.is-collapsed > .role-permission-node-row .role-permission-toggle {
            transform: rotate(-90deg);
        }

        .role-permission-node-label {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            cursor: pointer;
        }

        .role-permission-node-label input {
            width: 16px;
            height: 16px;
            accent-color: #667eea;
        }

        .role-permission-node-main {
            min-width: 0;
            display: flex;
            flex-wrap: wrap;
            align-items: baseline;
            gap: 6px;
        }

        .role-permission-tree-body > .role-permission-node > .role-permission-node-row .role-permission-node-main {
            display: grid;
            gap: 3px;
        }

        .role-permission-node-name {
            color: #1e293b;
            font-weight: 700;
        }

        .role-permission-node-code {
            color: #64748b;
            font-size: 12px;
            word-break: break-all;
        }

        .role-permission-type,
        .role-permission-count {
            padding: 3px 8px;
            border-radius: 999px;
            background: #eef2ff;
            color: #4f46e5;
            font-size: 11px;
            font-weight: 700;
            white-space: nowrap;
        }

        .role-permission-count.is-empty {
            background: #f1f5f9;
            color: #94a3b8;
        }

        .role-permission-children {
            margin-left: 0;
            padding-left: 0;
            border-left: 0;
        }

        .role-permission-tree-body > .role-permission-node > .role-permission-children {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 8px;
            align-content: start;
            padding-left: 14px;
            border-left: 1px dashed #cbd5e1;
        }

        .role-permission-tree-body > .role-permission-node.is-collapsed > .role-permission-children {
            display: none !important;
        }

        .role-permission-children > .role-permission-node.is-leaf {
            min-width: 0;
        }

        .role-permission-children > .role-permission-node.is-leaf > .role-permission-node-row {
            grid-template-columns: minmax(0, 1fr) auto;
            min-height: 42px;
            padding: 8px 10px;
            border: 1px solid #e5e7eb;
            background: #fff;
        }

        .role-permission-children > .role-permission-node.is-leaf > .role-permission-node-row:hover {
            border-color: #c7d2fe;
            background: #f8faff;
        }

        .role-permission-children > .role-permission-node.is-leaf .role-permission-toggle-placeholder {
            display: none;
        }

        .role-permission-children > .role-permission-node.is-leaf .role-permission-node-label {
            min-width: 0;
        }

        .role-permission-children > .role-permission-node.is-leaf .role-permission-node-main {
            display: grid;
            gap: 2px;
        }

        .role-permission-children > .role-permission-node.is-leaf .role-permission-type {
            justify-self: end;
        }

        .role-permission-hidden {
            display: none;
        }

        .role-permission-match > .role-permission-node-row {
            background: rgba(251, 191, 36, 0.14);
        }

        @media (max-width: 900px) {
            .role-permission-tree-body > .role-permission-node {
                grid-template-columns: 1fr;
            }

            .role-permission-tree-body > .role-permission-node > .role-permission-children {
                padding-left: 0;
                border-left: 0;
                grid-template-columns: 1fr;
            }
        }

        .permission-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 10px;
            border: 1px solid rgba(226, 232, 240, 0.6);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .permission-item:hover {
            background: rgba(102, 126, 234, 0.05);
            border-color: rgba(102, 126, 234, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
        }

        .permission-item input[type="checkbox"] {
            margin-right: 12px;
            width: 18px;
            height: 18px;
            accent-color: #667eea;
            cursor: pointer;
        }

        .permission-label {
            font-weight: 600;
            color: #334155;
            cursor: pointer;
            user-select: none;
        }

        .permission-matrix {
            overflow-x: auto;
            margin-top: 20px;
        }

        .matrix-table {
            width: 100%;
            border-collapse: collapse;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .matrix-table th,
        .matrix-table td {
            padding: 12px 15px;
            text-align: center;
            border-bottom: 1px solid rgba(226, 232, 240, 0.6);
        }

        .matrix-table th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 12px;
            letter-spacing: 0.5px;
        }

        .matrix-table tbody tr:nth-child(even) {
            background: rgba(102, 126, 234, 0.02);
        }

        .matrix-table tbody tr:hover {
            background: rgba(102, 126, 234, 0.08);
        }

        .matrix-checkbox {
            width: 18px;
            height: 18px;
            accent-color: #667eea;
            cursor: pointer;
        }

        .role-status {
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 11px;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .role-status.active {
            background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
            color: #155724;
            border: 1px solid #b6d7ba;
        }

        .role-status.inactive {
            background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
            color: #721c24;
            border: 1px solid #f5a9af;
        }

        .form-actions {
            display: flex;
            gap: 15px;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 2px solid rgba(226, 232, 240, 0.6);
        }

        #roleFormOverlay {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 1100;
            align-items: center;
            justify-content: center;
            padding: 24px;
            overflow-y: auto;
            box-sizing: border-box;
            background-color: rgba(15, 23, 42, 0.52);
            backdrop-filter: blur(5px);
            animation: none;
        }

        #roleFormOverlay .role-form-modal-content {
            width: min(1080px, 100%);
            max-width: 1080px;
            max-height: calc(100vh - 48px);
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: none;
            transform: none;
        }

        #roleFormOverlay .modal-header {
            flex: 0 0 auto;
        }

        #roleFormOverlay .modal-header h3 {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        #roleFormOverlay .modal-header h3::before {
            content: "";
        }

        #roleFormOverlay .modal-body {
            flex: 1 1 auto;
            max-height: none;
            overflow-y: auto;
        }

        #roleFormOverlay #roleFormContainer {
            padding: 0;
            max-height: none;
            overflow: visible;
        }

        #roleFormOverlay .form-actions {
            margin: 24px -25px -25px;
            padding: 20px 25px 24px;
            border-top: 1px solid #f3f4f6;
            background: #f8fafc;
            justify-content: flex-end;
        }

        #roleFormOverlay .permission-grid {
            max-height: none;
            margin-top: 8px;
            background: #f8fafc;
            border-radius: 8px;
        }

        @media (max-width: 768px) {
            #roleFormOverlay {
                padding: 8px;
            }

            #roleFormOverlay .role-form-modal-content {
                max-height: calc(100vh - 16px);
            }
        }

        .role-card {
            background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.95) 0%, 
                rgba(255, 255, 255, 0.9) 100%);
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 15px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
            transition: all 0.3s ease;
        }

        .role-card.active {
            border-left: 4px solid #22c55e;
        }

        .role-card.inactive {
            border-left: 4px solid #ef4444;
        }

        .role-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
        }

        .role-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .role-title {
            font-size: 1.2rem;
            font-weight: 700;
            color: #334155;
            margin: 0;
        }

        .role-code {
            background: rgba(102, 126, 234, 0.1);
            color: #667eea;
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .role-description {
            color: #64748b;
            margin-bottom: 15px;
            line-height: 1.5;
        }

        .role-permissions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }

        .permission-tag {
            background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
            color: #3730a3;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .permission-tag.empty {
            background: #f8fafc;
            color: #94a3b8;
            text-transform: none;
        }

        .role-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .role-btn {
            padding: 6px 14px;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
        }

        .role-btn.edit {
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
            color: white;
        }

        .role-btn.delete {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
        }

        .role-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .tree-node-actions {
            display: none;
            gap: 5px;
        }

        .tree-node:hover .tree-node-actions {
            display: flex;
        }

        .tree-action-btn {
            padding: 4px 8px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s ease;
        }

        /* 权限矩阵样式增强 */
        .matrix-info {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-radius: 12px;
            padding: 15px;
            margin: 15px 0;
            border-left: 4px solid #3b82f6;
        }

        .matrix-status {
            font-size: 13px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 20px;
            transition: all 0.3s ease;
        }

        .matrix-status.saved {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
        }

        .matrix-status.modified {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            animation: pulse 2s infinite;
        }

        .matrix-status.saving {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .matrix-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .matrix-table th {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            color: white;
            padding: 15px 12px;
            text-align: center;
            font-weight: 600;
            font-size: 14px;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .matrix-table th:first-child {
            text-align: left;
            min-width: 180px;
            max-width: 200px;
        }

        .matrix-table td {
            padding: 12px;
            border-bottom: 1px solid rgba(226, 232, 240, 0.5);
            text-align: center;
            position: relative;
        }

        .matrix-table td:first-child {
            text-align: left;
            font-weight: 600;
            color: #1e293b;
            background: rgba(248, 250, 252, 0.8);
            border-right: 2px solid rgba(59, 130, 246, 0.1);
        }

        .matrix-table tr:hover td {
            background: rgba(59, 130, 246, 0.05);
        }

        .matrix-checkbox {
            width: 20px;
            height: 20px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.3s ease;
            position: relative;
        }

        .matrix-checkbox:checked {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-color: #059669;
        }

        .matrix-checkbox.modified {
            border: 3px solid #f59e0b !important;
            box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
            animation: glow 1.5s ease-in-out infinite alternate;
        }

        @keyframes glow {
            from { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
            to { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4); }
        }

        .matrix-cell-modified {
            background: rgba(245, 158, 11, 0.1) !important;
            border-radius: 8px;
        }

        #saveMatrixBtn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        #saveMatrixBtn:not(:disabled) {
            animation: bounce 1s ease-in-out infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-2px); }
        }

        /* ==================== 模态框样式 ==================== */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
        }

        .modal-content {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            max-width: 600px;
            width: 100%;
            max-height: calc(100vh - 40px);
            overflow: hidden;
            margin: auto;
            position: relative;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px 28px 20px;
            border-bottom: 1px solid #f3f4f6;
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        }

        .modal-header h3 {
            margin: 0;
            color: #1f2937;
            font-size: 1.375rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-header h3::before {
            content: "✨";
            font-size: 1.125rem;
        }

        .modal-close {
            background: #f3f4f6;
            border: none;
            font-size: 1.25rem;
            color: #6b7280;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.2s ease;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            background: #e5e7eb;
            color: #374151;
            transform: scale(1.05);
        }

        .close {
            background: #f3f4f6;
            border: none;
            font-size: 18px;
            color: #6b7280;
            cursor: pointer;
            padding: 8px;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .close:hover {
            background: #e5e7eb;
            color: #374151;
            transform: scale(1.05);
        }

        .modal-body {
            padding: 28px;
            background: #fff;
            max-height: calc(70vh - 120px);
            overflow-y: auto;
        }

        .modal-body::-webkit-scrollbar {
            width: 6px;
        }

        .modal-body::-webkit-scrollbar-track {
            background: #f8f9fa;
            border-radius: 3px;
        }

        .modal-body::-webkit-scrollbar-thumb {
            background: #dee2e6;
            border-radius: 3px;
        }

        .modal-body::-webkit-scrollbar-thumb:hover {
            background: #adb5bd;
        }

        .modal-footer {
            padding: 20px 28px 24px;
            border-top: 1px solid #f3f4f6;
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            background: #f8fafc;
        }

        .modal-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid #e1e5e9;
        }

        .form-hint {
            display: block;
            margin-top: 5px;
            font-size: 12px;
            color: #64748b;
            font-style: italic;
        }

        /* 新增样式 - 筛选栏和小按钮 */
        .filter-bar {
            display: flex;
            gap: 20px;
            margin: 20px 0;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            flex-wrap: wrap;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .filter-group label {
            font-size: 12px;
            color: #64748b;
            font-weight: 500;
        }

        .filter-group select,
        .filter-group input {
            padding: 8px 12px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 14px;
            min-width: 150px;
        }

        .filter-group select:focus,
        .filter-group input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }

        .btn-small {
            padding: 6px 12px;
            margin: 0 2px;
            font-size: 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn-small.btn-primary {
            background: #667eea;
            color: white;
        }

        .btn-small.btn-warning {
            background: #ffc107;
            color: #000;
        }

        .btn-small.btn-danger {
            background: #dc3545;
            color: white;
        }

        .btn-small:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        /* 模态框footer样式 */
        .modal-footer {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            padding: 20px 30px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(0, 0, 0, 0.1);
        }

        /* 表格增强样式 */
        .table-container {
            margin-top: 20px;
            overflow-x: auto;
        }

        .data-table th {
            background: rgba(102, 126, 234, 0.1);
            border-bottom: 2px solid rgba(102, 126, 234, 0.3);
        }

        .data-table td {
            vertical-align: middle;
        }

        /* 响应式优化 */
        @media (max-width: 768px) {
            .filter-bar {
                flex-direction: column;
                gap: 15px;
            }
            
            .filter-group {
                width: 100%;
            }
            
            .filter-group select,
            .filter-group input {
                min-width: auto;
                width: 100%;
            }
        }

        .full-width {
            grid-column: 1 / -1;
        }

        /* 快速操作样式 */
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .quick-action-btn {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 20px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(226, 232, 240, 0.6);
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: left;
        }

        .quick-action-btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            border-color: rgba(59, 130, 246, 0.4);
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
        }

        .action-icon {
            font-size: 2em;
            opacity: 0.8;
            transition: all 0.3s ease;
        }

        .quick-action-btn:hover .action-icon {
            opacity: 1;
            transform: scale(1.1);
        }

        .action-text strong {
            display: block;
            color: #1e293b;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .action-text small {
            color: #64748b;
            font-size: 0.85em;
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes slideUp {
            from { 
                opacity: 0;
                transform: translateY(30px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .modal-content {
                margin: 20px;
                width: calc(100% - 40px);
            }
            
            .quick-actions {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .quick-action-btn {
                padding: 15px;
            }
            
            .action-icon {
                font-size: 1.5em;
            }
        }

        .tree-action-edit {
            background: #ffc107;
            color: #000;
        }

        .tree-action-delete {
            background: #dc3545;
            color: white;
        }

        .tree-action-add {
            background: #28a745;
            color: white;
        }

        .tree-expand-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 2px;
            margin-right: 5px;
            font-size: 12px;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 3px;
        }

        .tree-expand-btn:hover {
            background: rgba(0,0,0,0.1);
        }

        .tree-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 25px;
        }

        .tree-stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }

        .tree-stat-number {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .tree-stat-label {
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .batch-operations {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .batch-operations h4 {
            margin-bottom: 15px;
            color: #495057;
        }

        .batch-btn {
            margin-right: 10px;
            margin-bottom: 10px;
        }

        .selected-count {
            background: #667eea;
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            margin-left: 10px;
        }

        /* 统计卡片样式 */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: linear-gradient(135deg, 
                rgba(255,255,255,0.95) 0%, 
                rgba(255,255,255,0.9) 100%);
            backdrop-filter: blur(25px);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #667eea, #764ba2);
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        }

        .stat-card h3 {
            font-size: 2.5em;
            font-weight: 700;
            margin: 0 0 10px 0;
            color: #333;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .stat-card p {
            font-size: 1em;
            color: #666;
            margin: 0;
            font-weight: 500;
        }

        /* 报表网格样式 */
        .reports-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 25px;
            margin-top: 30px;
        }

        /* 搜索框样式 */
        .search-box {
            display: flex;
            align-items: center;
        }

        .search-box input {
            padding: 10px 15px;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 10px;
            background: rgba(255,255,255,0.2);
            color: #333;
            font-size: 14px;
            min-width: 200px;
            backdrop-filter: blur(10px);
        }

        .search-box input::placeholder {
            color: #999;
        }

        .search-box input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
        }

        #orderSearch {
            background: #fff;
            border: 1px solid #d1d5db;
            box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
        }

        #orderSearch:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
        }

        /* 响应式设计优化 */
        @media (max-width: 768px) {
            .stats-container {
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 15px;
            }
            
            .stat-card {
                padding: 20px;
            }
            
            .stat-card h3 {
                font-size: 2em;
            }
            
            .reports-grid {
                grid-template-columns: 1fr;
                gap: 20px;
                margin-top: 20px;
            }
            
            .content-section {
                padding: 15px;
            }
            
            .page-header {
                padding: 15px 20px;
                margin-bottom: 15px;
            }
            
            .search-box input {
                min-width: 150px;
            }
        }

        /* =============== 报表专用样式 =============== */
        
        /* 趋势指示器 */
        .trend {
            font-size: 0.8em;
            font-weight: 500;
            padding: 2px 8px;
            border-radius: 12px;
            margin-left: 8px;
        }
        
        .trend.up {
            color: #10b981;
            background: rgba(16, 185, 129, 0.1);
        }
        
        .trend.down {
            color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }
        
        /* 图表卡片 */
        .chart-card {
            position: relative;
        }
        
        .chart-controls {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .chart-controls select {
            padding: 5px 10px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            background: white;
            font-size: 12px;
        }
        
        .chart-container {
            padding: 20px;
            height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 成本分析网格 */
        .cost-analysis-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            padding: 20px;
        }
        
        .cost-section {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 20px;
            border-left: 4px solid #3b82f6;
        }
        
        .cost-section h4 {
            color: #374151;
            margin-bottom: 15px;
            font-size: 1.1em;
            font-weight: 600;
        }
        
        .cost-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }
        
        .cost-item.total {
            border-top: 2px solid #e5e7eb;
            border-bottom: none;
            margin-top: 10px;
            padding-top: 15px;
            font-weight: 600;
        }
        
        .cost-label {
            color: #6b7280;
            font-size: 0.9em;
        }
        
        .cost-value {
            font-weight: 600;
            font-size: 1.1em;
        }
        
        .cost-value.income {
            color: #10b981;
        }
        
        .cost-value.cost {
            color: #ef4444;
        }
        
        .cost-value.profit {
            color: #3b82f6;
        }
        
        /* 区域统计样式 */
        .region-stats {
            padding: 20px;
        }
        
        .region-item {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f1f5f9;
        }
        
        .region-item:last-child {
            border-bottom: none;
        }
        
        .region-name {
            flex: 0 0 100px;
            font-weight: 500;
            color: #374151;
        }
        
        .region-orders {
            flex: 0 0 60px;
            font-size: 0.9em;
            color: #6b7280;
        }
        
        .region-bar {
            flex: 1;
            height: 8px;
            background: #f1f5f9;
            border-radius: 4px;
            margin-left: 15px;
            overflow: hidden;
        }
        
        .region-progress {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #1d4ed8);
            border-radius: 4px;
            transition: width 0.3s ease;
        }
        
        /* 表格分页样式 */
        .table-pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: #f8f9fa;
            border-top: 1px solid #dee2e6;
            border-radius: 0 0 8px 8px;
        }
        
        .pagination-info {
            color: #6c757d;
            font-size: 14px;
        }
        
        .pagination-controls {
            display: flex;
            gap: 5px;
        }
        
        .pagination-btn {
            padding: 6px 12px;
            border: 1px solid #dee2e6;
            background: white;
            color: #6c757d;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
        }
        
        .pagination-btn:hover:not(:disabled) {
            background: #e9ecef;
            border-color: #adb5bd;
        }
        
        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .pagination-btn.active {
            background: #007bff;
            border-color: #007bff;
            color: white;
        }
        
        /* 加载状态 */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            z-index: 10;
        }
        
        .loading-spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #3498db;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* =============== 新增功能模块样式 =============== */
        
        /* 报表样式增强 */
        .analysis-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }
        
        .analysis-item {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 15px;
        }
        
        .analysis-chart {
            margin-bottom: 15px;
        }
        
        .analysis-details h4 {
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        .metric {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }
        
        .metric-label {
            color: #6c757d;
        }
        
        .metric-value {
            font-weight: 600;
        }
        
        .heatmap-container {
            position: relative;
        }
        
        .heatmap-legend {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 15px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 3px;
        }
        
        .realtime-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #28a745;
        }
        
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #dc3545;
        }
        
        .status-dot.active {
            background: #28a745;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        
        .realtime-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }
        
        .realtime-card {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
        }
        
        .realtime-title {
            font-size: 14px;
            color: #6c757d;
            margin-bottom: 8px;
        }
        
        .realtime-value {
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
            margin-bottom: 5px;
        }
        
        .realtime-change {
            font-size: 12px;
            color: #28a745;
        }
        
        .prediction-container {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-top: 20px;
        }
        
        .prediction-insights h4 {
            margin-bottom: 15px;
            color: #2c3e50;
        }
        
        .insights-list {
            list-style: none;
            padding: 0;
        }
        
        .insights-list li {
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }
        
        /* 通知系统样式 */
        .notifications-container {
            max-height: 500px;
            overflow-y: auto;
        }
        
        .notification-item {
            display: flex;
            align-items: flex-start;
            padding: 15px;
            border-bottom: 1px solid #eee;
            transition: background-color 0.2s;
        }
        
        .notification-item:hover {
            background-color: #f8f9fa;
        }
        
        .notification-item.unread {
            background-color: #e3f2fd;
            border-left: 4px solid #2196f3;
        }
        
        .notification-icon {
            font-size: 24px;
            margin-right: 15px;
            min-width: 40px;
        }
        
        .notification-content {
            flex: 1;
        }
        
        .notification-title {
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .notification-message {
            color: #6c757d;
            margin-bottom: 5px;
        }
        
        .notification-time {
            font-size: 12px;
            color: #999;
        }
        
        .notification-controls {
            display: flex;
            gap: 10px;
        }
        
        .notification-settings {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }
        
        .setting-group h4 {
            margin-bottom: 15px;
            color: #2c3e50;
        }
        
        .setting-item {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .setting-label {
            margin-left: 15px;
        }
        
        /* 开关样式 */
        .switch {
            position: relative;
            display: inline-block;
            width: 48px;
            height: 24px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 24px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #2196F3;
        }
        
        input:checked + .slider:before {
            transform: translateX(24px);
        }
        
        /* 文件管理样式 */
        .upload-container {
            margin-bottom: 30px;
        }
        
        .upload-zone {
            border: 2px dashed #d1d5db;
            border-radius: 8px;
            padding: 40px;
            text-align: center;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .upload-zone:hover {
            border-color: #3b82f6;
            background-color: #f8fafc;
        }
        
        .upload-zone.dragover {
            border-color: #3b82f6;
            background-color: #eff6ff;
        }
        
        .upload-icon {
            font-size: 48px;
            margin-bottom: 15px;
        }
        
        .upload-text h4 {
            margin-bottom: 8px;
            color: #374151;
        }
        
        .upload-text p {
            color: #6b7280;
            margin-bottom: 8px;
        }
        
        .upload-text small {
            color: #9ca3af;
        }
        
        .upload-progress {
            margin-top: 20px;
        }
        
        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: #e5e7eb;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background-color: #3b82f6;
            transition: width 0.3s;
        }
        
        .progress-text {
            text-align: center;
            margin-top: 8px;
            font-size: 14px;
            color: #6b7280;
        }
        
        .file-controls {
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .file-controls input[type="text"] {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            min-width: 200px;
        }
        
        .file-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }
        
        .file-item {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.2s;
        }
        
        .file-item:hover {
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        
        .file-preview {
            height: 120px;
            background: #f3f4f6;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
        }
        
        .file-info {
            padding: 12px;
        }
        
        .file-name {
            font-weight: 600;
            margin-bottom: 5px;
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .file-details {
            font-size: 12px;
            color: #6b7280;
        }
        
        .file-actions {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }
        
        .file-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
        }
        
        /* 评价系统样式 */
        .star-rating {
            margin-top: 5px;
        }
        
        .star {
            color: #fbbf24;
            font-size: 16px;
        }
        
        .star.active {
            color: #f59e0b;
        }
        
        .rating-distribution {
            margin-top: 20px;
        }
        
        .rating-item {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .rating-label {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 120px;
        }
        
        .stars {
            color: #fbbf24;
        }
        
        .rating-bar {
            flex: 1;
            height: 8px;
            background: #e5e7eb;
            border-radius: 4px;
            margin: 0 15px;
            overflow: hidden;
        }
        
        .rating-progress {
            height: 100%;
            background: #3b82f6;
            transition: width 0.3s;
        }
        
        .rating-count {
            min-width: 40px;
            text-align: right;
            font-weight: 600;
        }
        
        .ratings-list {
            margin-top: 20px;
        }
        
        .rating-card {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }
        
        .rating-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .rating-customer {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .customer-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #3b82f6;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }
        
        .customer-info {
            flex: 1;
        }
        
        .customer-name {
            font-weight: 600;
            margin-bottom: 2px;
        }
        
        .order-number {
            font-size: 12px;
            color: #6b7280;
        }
        
        .rating-score {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .rating-content {
            margin-bottom: 15px;
            line-height: 1.6;
        }
        
        .rating-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 15px;
            border-top: 1px solid #e5e7eb;
        }
        
        .rating-time {
            font-size: 12px;
            color: #9ca3af;
        }
        
        .rating-actions {
            display: flex;
            gap: 10px;
        }
        
        .ratings-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
        }
        
        .trend.warning {
            color: #f59e0b;
        }
        
        /* 用户个人信息模态框样式 */
        .user-profile-container {
            padding: 20px 0;
        }
        
        .profile-avatar-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 30px;
        }
        
        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #3498db;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .profile-avatar:hover {
            transform: scale(1.05);
        }
        
        .profile-form {
            max-width: 100%;
        }
        
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
        }
        
        .form-group label {
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        .form-group input,
        .form-group select {
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.3s ease;
        }
        
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }
        
        .form-group input[readonly] {
            background-color: #f8f9fa;
            color: #6c757d;
        }
        
        .profile-info {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
        }
        
        .info-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            padding: 8px 0;
            border-bottom: 1px solid #eee;
        }
        
        .info-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }
        
        /* 基础数据配置样式 */
        .config-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        
        .config-tab {
            padding: 10px 20px;
            border: 2px solid #e0e0e0;
            background: #f8f9fa;
            color: #333;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
            white-space: nowrap;
        }
        
        .config-tab:hover {
            border-color: #007bff;
            background: #e3f2fd;
            transform: translateY(-2px);
        }
        
        .config-tab.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        }
        
        .config-status-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
            text-align: center;
            min-width: 60px;
        }
        
        .config-status-badge.active {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .config-status-badge.inactive {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .config-enabled-toggle {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        
        .config-toggle-switch {
            position: relative;
            width: 44px;
            height: 24px;
            background: #ccc;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.3s ease;
        }
        
        .config-toggle-switch.enabled {
            background: #28a745;
        }
        
        .config-toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s ease;
        }
        
        .config-toggle-switch.enabled::after {
            transform: translateX(20px);
        }
        
        .config-sort-input {
            width: 60px;
            padding: 4px 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-align: center;
        }

        /* 基础数据配置模态框样式 */
        .modal {
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s ease;
        }
        
        .modal-content {
            background-color: #fefefe;
            margin: 2% auto;
            padding: 0;
            border: none;
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.3s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes slideIn {
            from { 
                opacity: 0;
                transform: translateY(-50px) scale(0.95);
            }
            to { 
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* 新建用户弹窗强制视口居中，避免长列表滚动后偏离当前可视区域 */
        #createUserModal {
            position: fixed;
            inset: 0;
            z-index: 1100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            overflow-y: auto;
            box-sizing: border-box;
        }

        #createUserModal .modal-content {
            margin: 0 auto;
            width: min(640px, 100%);
            max-width: 640px;
            max-height: calc(100vh - 48px);
            overflow: hidden;
        }

        #editUserModal {
            position: fixed;
            inset: 0;
            z-index: 1100;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            overflow-y: auto;
            box-sizing: border-box;
        }

        #editUserModal .modal-content {
            margin: 0 auto;
            width: min(760px, 100%);
            max-width: 760px;
            max-height: calc(100vh - 48px);
            overflow: hidden;
        }
        
        .modal-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 12px 12px 0 0;
        }
        
        .modal-header h3 {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
        }
        
        .modal-header .close,
        .modal-header .modal-close {
            color: #334155;
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid rgba(255, 255, 255, 0.78);
            box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
            font-size: 24px;
            font-weight: 800;
            line-height: 1;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border-radius: 50%;
        }
        
        .modal-header .close:hover,
        .modal-header .modal-close:hover {
            color: #dc2626;
            background: #ffffff;
            border-color: rgba(248, 113, 113, 0.55);
            transform: scale(1.06);
        }

        .modal-header .close:focus-visible,
        .modal-header .modal-close:focus-visible {
            outline: 3px solid rgba(255, 255, 255, 0.65);
            outline-offset: 2px;
        }
        
        .modal-body {
            padding: 25px;
            max-height: 60vh;
            overflow-y: auto;
        }
        
        .modal-footer {
            background: #f8f9fa;
            padding: 20px 25px;
            border-top: 1px solid #e9ecef;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            border-radius: 0 0 12px 12px;
        }
        
        .required {
            color: #dc3545;
            font-weight: bold;
        }
        
        .form-text {
            color: #6c757d;
            font-size: 12px;
            margin-top: 4px;
        }
        
        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-weight: 500;
            color: #333;
        }
        
        .checkbox-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #007bff;
        }

        /* 系统设置模态框样式 */
        .settings-container {
            min-height: 400px;
        }
        
        .settings-tabs {
            display: flex;
            flex-direction: column;
        }
        
        .tab-nav {
            display: flex;
            border-bottom: 2px solid #eee;
            margin-bottom: 20px;
        }
        
        .tab-btn {
            background: none;
            border: none;
            padding: 12px 20px;
            cursor: pointer;
            font-size: 14px;
            color: #6c757d;
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
        }
        
        .tab-btn:hover {
            color: #3498db;
            background-color: #f8f9fa;
        }
        
        .tab-btn.active {
            color: #3498db;
            border-bottom-color: #3498db;
            font-weight: 600;
        }
        
        .tab-content {
            min-height: 300px;
        }
        
        .settings-tab {
            display: none;
            animation: fadeIn 0.3s ease;
        }
        
        .settings-tab.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .settings-tab h4 {
            color: #2c3e50;
            margin-bottom: 20px;
            font-size: 16px;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
        }
        
        .setting-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            padding: 15px;
            border-radius: 8px;
            background: #f8f9fa;
            transition: background-color 0.2s ease;
        }
        
        .setting-item:hover {
            background-color: #e9ecef;
        }
        
        .setting-label {
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: 500;
        }
        
        .setting-label input[type="checkbox"] {
            margin-right: 10px;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .setting-item label:not(.setting-label) {
            font-weight: 600;
            color: #2c3e50;
            min-width: 120px;
        }
        
        .setting-item select,
        .setting-item input[type="number"] {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            min-width: 150px;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .form-row {
                grid-template-columns: 1fr;
                gap: 15px;
            }
            
            .tab-nav {
                flex-wrap: wrap;
            }
            
            .tab-btn {
                flex: 1;
                min-width: 120px;
            }
            
            .setting-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            
            .setting-item label:not(.setting-label) {
                min-width: auto;
            }
        }

        /* ==================== 订单详情样式 ==================== */
        .order-detail-section {
            margin-bottom: 24px;
            padding: 20px;
            background: #f8fafc;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }

        .order-detail-section h3 {
            margin: 0 0 16px 0;
            color: #1e293b;
            font-size: 1.125rem;
            font-weight: 600;
            padding-bottom: 8px;
            border-bottom: 2px solid #e2e8f0;
        }

        .detail-item {
            display: flex;
            margin-bottom: 12px;
            align-items: flex-start;
        }

        .detail-item label {
            min-width: 80px;
            font-weight: 500;
            color: #64748b;
            margin-right: 12px;
        }

        .detail-item span {
            color: #334155;
            flex: 1;
            word-break: break-all;
        }

        .status-badge {
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.875rem;
            font-weight: 500;
        }

        /* 待接单：支持多种 class 变体 */
        .status-badge.status-PENDING_ACCEPT,
        .status-badge.status-pending_accept,
        .status-badge.status-pending-accept,
        .status-badge.status-pending {
            background: #fef3c7;
            color: #d97706;
        }

        /* 兼容小写下划线变体 */
        /* 待清运：支持多种 class 变体，沿用 in_progress 配色 */
        .status-badge.status-PENDING_TRANSPORT,
        .status-badge.status-pending_transport,
        .status-badge.status-pending-transport,
        .status-badge.status-PENDING_TRANSPORT,
        .status-badge.status-pending_transport {
            background: #bbf7d0; /* 更鲜明的浅绿 */
            color: #059669; /* 加深的绿色文本 */
        }

        .status-badge.status-accepted {
            background: #dbeafe;
            color: #2563eb;
        }

        .status-badge.status-in_progress,
        .status-badge.status-in-progress {
            background: #bfdbfe; /* 浅蓝 */
            color: #1d4ed8; /* 明显的蓝色文本 */
        }

        .status-badge.status-completed {
            background: #ccfbf1; /* 淡青/绿，区别于其它绿 */
            color: #0ea5a4; /* 青色文本 */
        }

        .status-badge.status-paid {
            background: #ccfbf1;
            color: #0ea5a4;
        }

        .status-badge.status-unpaid {
            background: #fef3c7;
            color: #d97706;
        }

        .status-badge.status-cancelled {
            background: #fee2e2;
            color: #dc2626;
        }

        .image-gallery {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }

        .status-timeline {
            margin-top: 16px;
        }

        .timeline-item {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            padding: 8px 0;
            position: relative;
        }

        .timeline-item::before {
            content: '';
            width: 12px;
            height: 12px;
            background: #e2e8f0;
            border: 2px solid #fff;
            border-radius: 50%;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .timeline-item.completed::before {
            background: #10b981;
        }

        .timeline-time {
            min-width: 140px;
            color: #64748b;
            font-size: 0.875rem;
            margin-right: 12px;
        }

        .timeline-text {
            color: #334155;
            font-weight: 500;
        }

        .timeline-item.completed .timeline-text {
            color: #10b981;
        }

        /* 服务费配置样式 */
        .content-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-top: 30px;
        }

        .config-card, .calculator-card {
            background: #fff;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border: 1px solid #e1e5e9;
        }

        .connection-status {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.9em;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #fbbf24;
            animation: pulse 2s infinite;
        }

        .status-dot.online {
            background: #10b981;
        }

        .status-dot.offline {
            background: #ef4444;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .form-help {
            display: block;
            margin-top: 4px;
            font-size: 0.8em;
            color: #6b7280;
        }

        .calculator-input {
            margin-bottom: 20px;
        }

        .calculator-input label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #374151;
        }

        .calculator-input input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 1.1em;
            transition: border-color 0.3s ease;
        }

        .calculator-input input:focus {
            outline: none;
            border-color: #3b82f6;
        }

        .calculation-result {
            background: linear-gradient(135deg, #f8fafc, #f1f5f9);
            border-radius: 8px;
            padding: 20px;
        }

        .calc-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #e5e7eb;
        }

        .calc-item:last-child {
            border-bottom: none;
        }

        .calc-item.final {
            border-top: 2px solid #3b82f6;
            margin-top: 12px;
            padding-top: 12px;
            font-weight: 600;
        }

        .calc-label {
            color: #6b7280;
            font-size: 0.9em;
        }

        .calc-value {
            font-weight: 500;
            color: #374151;
        }

        .final-amount {
            font-size: 1.2em;
            color: #dc2626;
            font-weight: 700;
        }

        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75em;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .badge-info {
            background: #dbeafe;
            color: #1d4ed8;
        }

        @media (max-width: 768px) {
            .content-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }
        }

    input,
    textarea,
    select,
    option,
    .form-control,
    .filter-group input,
    .filter-group select,
    .tree-search-input,
    .search-box input {
        color: #111 !important;
        -webkit-text-fill-color: #111 !important; /* iOS/Chromium */
        text-shadow: none !important;
    }

    /* option 单独处理，避免被系统样式完全覆盖时看不到文字 */
    option {
        color: #111 !important;
        background-color: #fff !important;
    }

    /* 如果某些筛选条使用深色背景，但希望输入可见，调整背景与边框 */
    .filter-group select,
    .filter-group input {
        background: rgba(255,255,255,0.92) !important;
        border-color: #d1d5db !important;
        color: #111 !important;
    }

    /* 针对带箭头的 select 保持箭头显示同时文本可见 */
    select.form-control {
        color: inherit !important;
        -webkit-text-fill-color: inherit !important;
    }

/* === Driver agency badge styles === */
        .badge-agency, .badge-agency-unknown, .badge-agency-none {
            display:inline-block; padding:2px 8px; font-size:12px; line-height:1.2; border-radius:12px; border:1px solid transparent; white-space:nowrap;
        }
        .badge-agency { background:#e6ffed; color:#036636; border-color:#9ae6b4; }
        .badge-agency-unknown { background:#fff7e6; color:#ad6800; border-color:#ffd666; }
        .badge-agency-none { background:#f5f5f5; color:#555; border-color:#d9d9d9; }
        .driver-sort-bar { margin:8px 0 12px; display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
        .driver-sort-bar select, .driver-sort-bar button { padding:4px 8px; }

.order-detail-modal{max-width:760px;margin:40px auto;padding:0 0 8px 0;}
                                .od-body{max-height:70vh;overflow-y:auto;padding:10px 24px 16px;}
                                .od-section{border:1px solid #eee;border-radius:8px;padding:12px 14px;margin-bottom:14px;background:#fff;}
                                .od-title{margin:0 0 10px;font-size:16px;display:flex;align-items:center;gap:6px;}
                                .kv{display:flex;justify-content:space-between;gap:12px;line-height:1.5;padding:4px 0;font-size:14px;border-bottom:1px dashed #f0f0f0;}
                                .kv:last-child{border-bottom:none;}
                                .kv.multi{align-items:flex-start;}
                                .kv span:first-child{color:#666;min-width:86px;flex-shrink:0;}
                                .addr-block{font-size:14px;line-height:1.6;}
                                .addr-full{font-weight:500;margin-bottom:4px;}
                                .addr-contact{color:#444;}
                                .addr-community{margin-top:4px;font-size:13px;color:#333;}
                                .price-box{border:1px solid #f2f2f2;border-radius:6px;padding:8px 10px;background:#fafafa;margin-bottom:6px;}
                                .price-row{display:flex;justify-content:space-between;padding:4px 0;font-size:14px;}
                                .price-total{display:flex;justify-content:space-between;padding:6px 0 2px;border-top:1px solid #e5e5e5;margin-top:4px;font-weight:600;font-size:15px;}
                                .price-total .total{color:#d9480f;}
                                .note{font-size:12px;color:#888;line-height:1.4;}
                                .images-grid{display:flex;flex-wrap:wrap;gap:8px;}
                                .od-image{width:110px;height:110px;object-fit:cover;border:1px solid #ddd;border-radius:6px;cursor:pointer;transition:box-shadow .2s;}
                                .od-image:hover{box-shadow:0 0 0 3px #1677ff33;}
                                .empty-tip{font-size:13px;color:#999;}
                                .timeline{position:relative;margin-left:4px;}
                                .tl-item{display:flex;position:relative;padding:6px 0 6px 4px;}
                                .tl-item:before{content:"";position:absolute;left:6px;top:0;bottom:0;width:2px;background:#e5e5e5;}
                                .tl-item:last-child:before{bottom:14px;}
                                .tl-dot{width:12px;height:12px;border-radius:50%;background:#bbb;position:relative;z-index:1;margin-right:14px;margin-left:-1px;box-shadow:0 0 0 3px #fff;}
                                .tl-item.done .tl-dot{background:#52c41a;}
                                .tl-content{font-size:13px;}
                                .tl-title{font-weight:600;}
                                .tl-time{color:#666;font-size:12px;margin-top:2px;}
                                .records-container{display:flex;flex-direction:column;gap:12px;}
                                .record-item{border:1px solid #f0f0f0;border-radius:6px;padding:12px;background:#fafafa;}
                                .record-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
                                .record-title{font-weight:500;font-size:14px;color:#333;}
                                .record-time{font-size:12px;color:#888;}
                                .record-details{margin-bottom:8px;}
                                .record-detail-item{display:flex;font-size:13px;margin-bottom:4px;}
                                .record-detail-item span:first-child{color:#666;min-width:60px;}
                                .record-detail-item span:last-child{color:#333;font-weight:500;}
                                .record-photos{display:flex;flex-wrap:wrap;gap:6px;}
                                .record-photo{width:80px;height:80px;object-fit:cover;border:1px solid #ddd;border-radius:4px;cursor:pointer;transition:transform 0.2s;}
                                .record-photo:hover{transform:scale(1.05);}

/* Multi-page admin navigation fallback. */
.menu-item[aria-current="page"] {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.menu-item[aria-current="page"]::before {
  transform: translateX(0);
}

/* Unified admin dialogs */
#adminDialogRoot {
    position: relative;
    z-index: 10000;
}

.admin-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(2px);
}

.admin-dialog {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-dialog-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.admin-dialog-mark {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    position: relative;
    margin-top: 1px;
}

.admin-dialog-mark::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 8px;
    width: 3px;
    height: 14px;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 18px 0 -6px #fff;
}

.admin-dialog-danger .admin-dialog-mark,
.admin-dialog-error .admin-dialog-mark {
    background: #dc2626;
}

.admin-dialog-success .admin-dialog-mark {
    background: #16a34a;
}

.admin-dialog-warning .admin-dialog-mark {
    background: #d97706;
}

.admin-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #111827;
}

.admin-dialog-header p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #64748b;
}

.admin-dialog-body {
    padding: 18px 22px 6px;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
    max-height: 45vh;
    overflow: auto;
}

.admin-dialog-body p {
    margin: 0 0 10px;
    word-break: break-word;
}

.admin-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
    background: #fff;
}

.admin-dialog-footer .btn {
    min-width: 84px;
}

@media (max-width: 560px) {
    .admin-dialog-overlay {
        align-items: flex-end;
        padding: 16px;
    }

    .admin-dialog {
        width: 100%;
    }
}
