/* ========================================
   道路运输公司数字化管理系统 - 样式表
   蓝色主题，左侧导航 + 右侧主区域布局
   ======================================== */

/* ========== 重置与基础 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --primary-light: #e6f7ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #f5222d;
    --info: #13c2c2;
    --text-main: #333333;
    --text-secondary: #666666;
    --text-placeholder: #999999;
    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    /* 蓝灰后台主题：参考管理系统的沉稳蓝灰导航 */
    --bg-sidebar: #33495e;
    --bg-sidebar-hover: #2a4054;
    --border-color: #e8e8e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 6px;
    --sidebar-width: 220px;
    --header-height: 48px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-page);
    overflow: hidden;
    height: 100vh;
}

/* ========== 登录页 ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 50%, #0050b3 100%);
}

.login-card {
    width: 400px;
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo h1 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 6px;
}

.login-card .logo p {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.login-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.login-card input,
.login-card select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-card input:focus,
.login-card select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}

.login-card .login-btn {
    width: 100%;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-card .login-btn:hover {
    background: var(--primary-dark);
}

.login-tip {
    margin-top: 20px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.login-page { position: relative; overflow: hidden; isolation: isolate; flex-direction: column; gap: 22px; background: linear-gradient(135deg, #0d3768 0%, #165d9f 52%, #0a4a91 100%); }
.login-background { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-background span { position: absolute; display: block; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); }
.login-background span:nth-child(1) { top: -225px; left: -90px; box-shadow: 0 0 0 75px rgba(255,255,255,.035), 0 0 0 150px rgba(255,255,255,.025); }
.login-background span:nth-child(2) { right: -160px; bottom: -240px; box-shadow: 0 0 0 85px rgba(80,180,255,.08), 0 0 0 165px rgba(80,180,255,.04); }
.login-background span:nth-child(3) { width: 190px; height: 190px; top: 13%; right: 17%; border-color: rgba(255,255,255,.09); }
.login-card { position: relative; width: min(410px, calc(100vw - 36px)); padding: 34px 36px 30px; border: 1px solid rgba(255,255,255,.78); box-shadow: 0 20px 55px rgba(0,31,74,.30); }
.login-card .logo { margin-bottom: 24px; }
.login-copyright { position: relative; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.5; letter-spacing: .1px; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.login-card .logo h1 { color: #164f88; letter-spacing: .3px; }
.captcha-group { margin-bottom: 16px !important; }
.captcha-row, .recovery-code-row { display: flex; gap: 9px; align-items: center; }
.captcha-row input, .recovery-code-row input { min-width: 0; flex: 1; }
.captcha-image { display: block; width: 122px; height: 42px; border: 1px solid #cbddef; border-radius: 6px; cursor: pointer; background: #eef5ff; }
.captcha-refresh { width: 34px; height: 38px; flex: 0 0 34px; border: 0; border-radius: 6px; background: #eef5ff; color: #1768b4; font-size: 21px; cursor: pointer; }
.login-actions { display: flex; align-items: center; justify-content: space-between; margin: -3px 0 18px; color: #8492a6; font-size: 12px; }
.text-link, .back-login-btn { padding: 0; border: 0; background: none; color: #1768b4; cursor: pointer; font-size: 12px; }
.login-card .login-btn:disabled, .outline-btn:disabled { opacity: .68; cursor: wait; }
.password-recovery-panel[hidden], #login-form-panel[hidden] { display: none; }
.recovery-head { margin: 0 0 18px; }
.recovery-head h3 { margin: 0 0 6px; color: #164f88; font-size: 18px; }
.recovery-head p { margin: 0; color: #7a8797; font-size: 12px; line-height: 1.6; }
.outline-btn { width: 105px; height: 40px; flex: 0 0 105px; border: 1px solid #1890ff; border-radius: 6px; color: #1768b4; background: #fff; cursor: pointer; font-size: 12px; }
.back-login-btn { display: block; width: 100%; margin-top: 14px; font-size: 13px; }
@media (max-width: 480px) { .login-card { padding: 30px 24px 25px; } .login-brand-mark { margin-top: -54px; } .login-actions { gap: 10px; } }

/* ========== 主框架布局 ========== */
.app-layout {
    display: flex;
    height: 100vh;
    position: relative;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: rgba(255,255,255,0.65);
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: visible;
    transition: width 0.3s;
    position: relative;
}

.sidebar.collapsed {
    width: 0 !important;
}

/* 拖拽调节宽度的把手 */
.sidebar-resizer {
    width: 4px;
    background: transparent;
    cursor: ew-resize;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s;
    margin-left: -2px;
    z-index: 10;
}

.sidebar-resizer:hover,
.sidebar-resizer.active {
    background: var(--primary);
}

.sidebar-resizer::after {
    content: '⋮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    pointer-events: none;
    user-select: none;
    transition: color 0.2s;
}

.sidebar-resizer:hover::after,
.sidebar-resizer.active::after {
    color: #fff;
}

/* 三角形隐藏/显示按钮 —— 绝对定位在侧边栏右边缘，垂直居中 */
.sidebar-toggle {
    position: absolute;
    top: 50%;
    left: var(--sidebar-width);
    transform: translate(-100%, -50%);
    z-index: 100;
    width: 10px;
    height: 28px;
    border-radius: 10px 0 0 10px;   /* 半圆，左边圆弧贴住侧边栏右侧 */
    background: var(--primary);
    color: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    line-height: 1;
    padding: 0;
    padding-right: 1px;
    box-shadow: -1px 0 4px rgba(0,0,0,0.22);
    transition: width 0.2s, height 0.2s, border-radius 0.2s, background 0.2s, box-shadow 0.2s, left 0.3s;
    user-select: none;
}

.sidebar-toggle:hover {
    background: #3470d0;
    width: 12px;
    height: 34px;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 0 6px rgba(58, 110, 200, 0.5);
}

/* 侧边栏折叠时，三角按钮随侧边栏一起隐藏 */
.sidebar.collapsed ~ .sidebar-toggle {
    display: none;
}

/* 侧边栏隐藏后，页面左侧贴边的"展开"半圆按钮 */
.sidebar-show {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    width: 10px;
    height: 28px;
    border-radius: 0 10px 10px 0;   /* 完美半圆：左边缘平直贴边，右侧圆弧 */
    background: var(--primary);
    color: rgba(255,255,255,0.92);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    line-height: 1;
    padding: 0;
    box-shadow: 1px 0 4px rgba(0,0,0,0.2);
    transition: width 0.2s, height 0.2s, border-radius 0.2s, background 0.2s, box-shadow 0.2s;
}

body.sidebar-collapsed .sidebar-show {
    display: flex;
}

.sidebar-show:hover {
    background: #3470d0;
    width: 12px;
    height: 34px;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 6px rgba(58, 110, 200, 0.5);
}

/* 侧边栏收起时：让内容往右挪，避开贴边的把手 */
body.sidebar-collapsed .content-body {
    padding-left: 18px;
    transition: padding-left 0.3s ease;
}

/* 车辆档案照片 */
.vehicle-photo-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf1f5;
}
.vehicle-photo-heading {
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 12px;
}
.vehicle-photo-heading span {
    margin-left: 8px;
    color: #8b98a9;
    font-weight: 400;
    font-size: 12px;
}
.vehicle-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.vehicle-photo-card {
    border: 1px solid #e7edf4;
    border-radius: 6px;
    padding: 10px;
    background: #fafcff;
    min-height: 88px;
}
.vehicle-photo-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #40566f;
    font-size: 13px;
    margin-bottom: 8px;
}
.vehicle-photo-label em {
    font-style: normal;
    color: #9aa7b8;
    font-size: 12px;
}
.vehicle-photo-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}
.vehicle-photo-item {
    position: relative;
    width: 48px;
    height: 48px;
}
.vehicle-photo-item img, .vehicle-detail-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #d9e2ed;
}
.vehicle-photo-item button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #ff4d4f;
    line-height: 14px;
    font-size: 14px;
    cursor: pointer;
}
.vehicle-photo-upload {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 12px;
    color: #2f86eb;
    border: 1px dashed #91caff;
    border-radius: 4px;
    background: #f0f7ff;
    cursor: pointer;
}
.vehicle-photo-upload input { display: none; }
.vehicle-detail-photos {
    display: inline-flex;
    flex-wrap: wrap;
    vertical-align: middle;
    gap: 8px;
    margin-left: 8px;
}
.vehicle-detail-photos a {
    width: 70px;
    height: 54px;
    display: inline-block;
}
.field-extension-panel {
    padding: 18px;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 4px;
}
.field-extension-toolbar {
    margin-bottom: 16px;
}
.field-extension-table th {
    white-space: nowrap;
}
.field-extension-table td {
    vertical-align: middle;
}
.field-sort-input {
    width: 58px;
    height: 30px;
    padding: 4px 7px;
    border: 1px solid #d8e0e9;
    border-radius: 2px;
    color: #36495d;
    text-align: center;
}
.field-extension-actions {
    margin-top: 16px;
}
.btn-warning {
    color: #fff;
    background: #fa8c16;
    border-color: #fa8c16;
}
.btn-warning:hover {
    color: #fff;
    background: #d46b08;
    border-color: #d46b08;
}
.field-designer-tip {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #f0f7ff;
    border: 1px solid #d6e9ff;
    border-radius: 6px;
    color: #5f7185;
    font-size: 13px;
}
.field-designer-tip strong { color: #1e6ebf; white-space: nowrap; }
.field-system-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 3px;
    color: #2f86eb;
    background: #e6f4ff;
    font-size: 11px;
    font-weight: normal;
}
.field-code, .field-options { margin-top: 4px; color: #9aa7b8; font-size: 12px; }
.field-sort-actions .btn-link:disabled { color: #c5cbd3; cursor: not-allowed; }
@media (max-width: 680px) {
    .vehicle-photo-grid { grid-template-columns: 1fr; }
    .field-designer-tip { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* 拖拽时的全局样式 */
body.sidebar-resizing {
    cursor: ew-resize !important;
    user-select: none !important;
}

body.sidebar-resizing * {
    cursor: ew-resize !important;
    user-select: none !important;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.sidebar .logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    background: linear-gradient(180deg, #4f98d1 0%, #438dcc 100%);
    box-shadow: inset 0 -1px rgba(255,255,255,0.16);
    letter-spacing: 0.2px;
}

.sidebar .logo span { margin-left: 8px; }

.sidebar .menu {
    padding: 8px 0;
}

.menu-group {
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.055);
}

.menu-group-title {
    min-height: 46px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s, color 0.2s;
}

.menu-group-title:hover {
    color: #fff;
    background: rgba(0,0,0,0.09);
}

.menu-group-title .arrow {
    transition: transform 0.3s;
    font-size: 10px;
}

.menu-group.collapsed .arrow {
    transform: rotate(-90deg);
}

.menu-group-items {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.menu-group.collapsed .menu-group-items {
    max-height: 0 !important;
}

.menu-item {
    position: relative;
    min-height: 42px;
    padding: 0 18px 0 34px;
    font-size: 13px;
    color: rgba(255,255,255,0.76);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 19px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.38);
}

.menu-item:hover {
    color: #fff;
    background: rgba(0,0,0,0.11);
}

.menu-item.active {
    color: #fff;
    background: #4b97d2;
    box-shadow: inset 3px 0 0 #d9f0ff, 0 2px 5px rgba(0,0,0,0.10);
    font-weight: 500;
}

.menu-item.active::before { background: #fff; }

.menu-item .icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* ========== 主内容区 ========== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部栏 */
.topbar {
    height: var(--header-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    z-index: 10;
    flex-shrink: 0;
}

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

.topbar .breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
}

.topbar .breadcrumb span {
    color: var(--text-main);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar .company-name {
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 4px;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.topbar .user-info .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.topbar .logout-btn {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}

.topbar .logout-btn:hover {
    color: var(--danger);
}

/* 内容容器 */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* ========== 底部页脚 ========== */
.layout-footer {
    flex-shrink: 0;
    padding: 13px 24px;
    background: linear-gradient(180deg, #3d566d 0%, #33495e 100%);
    color: rgba(255,255,255,0.76);
    font-size: 12px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    box-shadow: 0 -2px 9px rgba(30, 48, 65, 0.16);
}

.layout-footer .footer-sep {
    color: rgba(255,255,255,0.36);
    margin: 0 8px;
    user-select: none;
}

.layout-footer a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.layout-footer a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .layout-footer {
        font-size: 11px;
        padding: 10px 12px;
    }
    .layout-footer .footer-sep {
        margin: 0 4px;
    }
}

/* ========== 通用页面组件 ========== */

/* 页面标题 */
.page-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h2 {
    font-size: 18px;
    font-weight: 500;
}

/* 筛选区 */
.filter-bar {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item label {
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-item input,
.filter-item select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    min-width: 140px;
    transition: border-color 0.3s;
}

.filter-item input:focus,
.filter-item select:focus {
    border-color: var(--primary);
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* 按钮 */
.btn {
    height: 32px;
    padding: 0 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-link {
    border: none;
    background: none;
    color: var(--primary);
    padding: 0 4px;
    height: auto;
    font-size: 13px;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.btn-link.danger {
    color: var(--danger);
}

/* 数据表格 */
.data-table {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #fafafa;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-main);
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table .col-actions {
    white-space: nowrap;
}

.data-table .col-actions .btn-link {
    margin-right: 8px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-placeholder);
}

.empty-state p {
    font-size: 14px;
    line-height: 2;
}

.empty-state .hint {
    font-size: 12px;
    color: var(--text-placeholder);
    margin-top: 8px;
}

/* 分页 */
.pagination {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-controls button {
    min-width: 32px;
    height: 32px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: all 0.2s;
}

.pagination-controls button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-controls button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination-controls button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========== 弹窗 ========== */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #fff;
    border-radius: 8px;
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s;
}

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

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.modal-close {
    font-size: 18px;
    color: var(--text-placeholder);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-main);
}

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

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Tab 组件 */
.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: 0;
}
.settings-tab {
    padding: 10px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
    user-select: none;
}
.settings-tab:hover { color: #1890ff; }
.settings-tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 500;
}
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }

/* 设置面板 */
.settings-panel {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.settings-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.settings-section:last-child { border-bottom: none; margin-bottom: 0; }
.settings-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 3px solid #1890ff;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 16px;
}
.settings-row .setting-label {
    flex-shrink: 0;
    width: 180px;
    font-size: 13px;
    color: #666;
}
.settings-row .setting-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-row .setting-control input,
.settings-row .setting-control select {
    flex: 1;
    height: 32px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
}
.settings-row .setting-control .unit {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 22px;
    transition: 0.3s;
}
.toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #1890ff; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-item {
    flex: 1;
}

.form-item {
    margin-bottom: 16px;
}

.form-item:last-child {
    margin-bottom: 0;
}

.form-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-main);
}

.form-item label .required {
    color: var(--danger);
    margin-right: 2px;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
    background: #fff;
}

.form-item textarea {
    height: 80px;
    padding: 8px 12px;
    resize: vertical;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
}

.form-item input[disabled],
.form-item select[disabled] {
    background: #f5f5f5;
    color: var(--text-placeholder);
    cursor: not-allowed;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 20px;
}

.tag-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-red { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.tag-gray { background: #fafafa; color: #666; border: 1px solid #d9d9d9; }
.tag-cyan { background: #e6fffb; color: #13c2c2; border: 1px solid #87e8de; }
.tag-purple { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* ========== 多人标签输入 ========== */
.multi-person-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #d9d9d9;
    border-radius: var(--radius);
    background: #fff;
    cursor: text;
}
.multi-person-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.person-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 13px;
    line-height: 1.6;
    white-space: nowrap;
}
.person-tag-remove {
    background: none;
    border: none;
    color: #1890ff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 0 0 2px;
    margin: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.person-tag-remove:hover {
    opacity: 1;
    color: #f5222d;
}

/* ========== 仪表盘卡片 ========== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.stat-card .stat-info h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-card .stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 仪表盘区域 */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-size: 15px;
    font-weight: 500;
}

.panel-body {
    padding: 16px;
}

/* 到期提醒列表 */
.reminder-list {
    max-height: 320px;
    overflow-y: auto;
}

.reminder-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.reminder-item .ri-info {
    flex: 1;
}

.reminder-item .ri-info .ri-title {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.reminder-item .ri-info .ri-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.reminder-item .ri-days {
    font-size: 13px;
    font-weight: 600;
}

/* 文件上传 */
.upload-area {
    border: 1px dashed #d9d9d9;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
}

.upload-area p {
    color: var(--text-placeholder);
    font-size: 13px;
}

/* 多选标签 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-tag {
    padding: 4px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.checkbox-tag.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* 提示消息 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s;
    min-width: 200px;
}

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

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
.toast-warning { background: var(--warning); }

/* 文本辅助 */
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* 树形结构 */
.tree-node {
    padding-left: 0;
}

.tree-children {
    padding-left: 20px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-placeholder);
}

.loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式微调 */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}
