/* 山水外供应链管理平台 - 样式表 */
:root {
    --primary: #1a3c2a;
    --primary-light: #2d8a6e;
    --primary-dark: #0f2519;
    --primary-hover: #24583c;
    --accent: #c9a96e;
    --bg: #f4f6f5;
    --bg-card: #ffffff;
    --bg-sidebar: #1a3c2a;
    --text: #2c3e35;
    --text-light: #6b8075;
    --text-white: #ffffff;
    --border: #d4ddd8;
    --border-light: #e8edea;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --info: #1890ff;
    --shadow: 0 2px 8px rgba(26, 60, 42, 0.08);
    --shadow-lg: 0 4px 16px rgba(26, 60, 42, 0.12);
    --radius: 6px;
    --radius-lg: 10px;
    --sidebar-width: 220px;
    --header-height: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary-light); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary); }
button, input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }

/* 登录页面 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f2519 0%, #1a3c2a 50%, #2d8a6e 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Cpath fill='%23ffffff' fill-opacity='0.03' d='M0,600 Q200,400 400,500 T800,450 T1200,550 L1200,800 L0,800 Z'/%3E%3C/svg%3E") no-repeat center bottom;
    background-size: cover;
    pointer-events: none;
}
.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo h1 { font-size: 32px; color: var(--primary); font-weight: 700; letter-spacing: 8px; }
.login-logo p { color: var(--text-light); font-size: 14px; letter-spacing: 4px; margin-top: 8px; }

/* 布局 */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
}
.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
.sidebar-logo h2 { color: var(--text-white); font-size: 20px; }
.sidebar-logo h2 span { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.6); font-weight: 400; margin-top: 4px; letter-spacing: 2px; }
.sidebar-menu { padding: 12px 0; }
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-white); }
.menu-item.active { background: rgba(255, 255, 255, 0.1); color: var(--text-white); border-left-color: var(--accent); }
.menu-item .icon { margin-right: 12px; font-size: 16px; }

.main-wrapper { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
    background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text);
    width: 32px; height: 32px; display: none; border-radius: 4px;
}
.breadcrumb { color: var(--text-light); font-size: 14px; }
.breadcrumb span { margin: 0 4px; }
.breadcrumb span:last-child { color: var(--text); font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-action {
    background: none; border: none; cursor: pointer; font-size: 18px; color: var(--text); position: relative;
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.header-action:hover { background: var(--bg); }
.header-action .badge {
    position: absolute; top: 0; right: 0;
    background: var(--danger); color: white;
    font-size: 10px; padding: 2px 5px; border-radius: 10px; min-width: 16px; text-align: center;
}
.user-dropdown { position: relative; cursor: pointer; }
.user-info { display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: var(--radius); }
.user-info:hover { background: var(--bg); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
}
.user-name { font-size: 14px; color: var(--text); }
.dropdown-menu {
    position: absolute; right: 0; top: 100%;
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    min-width: 180px; padding: 6px 0; display: none; z-index: 100;
}
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-item {
    padding: 10px 16px; cursor: pointer; color: var(--text); font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.dropdown-item:hover { background: var(--bg); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

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

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary);
}
.stat-card.primary { border-left-color: var(--primary); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-icon {
    position: absolute; right: 20px; top: 20px;
    font-size: 32px; opacity: 0.15;
}
.stat-label { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.stat-change { font-size: 12px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* 行布局 */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title { font-size: 16px; font-weight: 600; color: var(--text); }
.card-actions { display: flex; gap: 8px; }
.card-body { padding: 20px; }

/* 列表 */
.list-group { list-style: none; }
.list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.list-item:last-child { border-bottom: none; }
.list-item-left { display: flex; align-items: center; gap: 12px; }
.list-item-title { font-weight: 500; color: var(--text); }
.list-item-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.list-item-value { color: var(--danger); font-weight: 600; }

/* 警示项 */
.warning-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.warning-item:last-child { border-bottom: none; }
.warning-item.danger .warning-title { color: var(--danger); }
.warning-icon { font-size: 18px; }
.warning-content { flex: 1; }
.warning-title { font-size: 13px; color: var(--text); }
.warning-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* 标签 */
.tag {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 12px; line-height: 1.6; font-weight: 500;
}
.tag-success { background: rgba(82, 196, 26, 0.1); color: var(--success); }
.tag-warning { background: rgba(250, 173, 20, 0.1); color: var(--warning); }
.tag-danger { background: rgba(255, 77, 79, 0.1); color: var(--danger); }
.tag-info { background: rgba(24, 144, 255, 0.1); color: var(--info); }
.tag-primary { background: rgba(45, 138, 110, 0.1); color: var(--primary-light); }
.tag-default { background: var(--border-light); color: var(--text-light); }

/* 等级徽章 */
.level-badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.level-gold { background: linear-gradient(135deg, #ffd700, #ffb800); color: #7a5700; }
.level-silver { background: linear-gradient(135deg, #e8e8e8, #c0c0c0); color: #555; }
.level-bronze { background: linear-gradient(135deg, #d4a574, #b8860b); color: #4a3520; }
.level-normal { background: var(--border-light); color: var(--text-light); }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 14px; cursor: pointer; transition: all 0.2s;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
    text-decoration: none;
}
.btn:hover { border-color: var(--primary-light); color: var(--primary); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: white; }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { background: #449d11; color: white; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #d9363e; color: white; }
.btn-default { background: var(--bg-card); }
.btn-block { width: 100%; justify-content: center; padding: 12px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--primary-light); cursor: pointer; padding: 4px 8px; }
.btn-link:hover { color: var(--primary); }
.btn-link.danger { color: var(--danger); }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text); font-size: 13px; font-weight: 500; }
.form-input {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-card); color: var(--text);
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-inline { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.checkbox-wrapper { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* 筛选条 */
.filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.filter-input {
    padding: 6px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); min-width: 160px;
}
.filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* 表格 */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
.data-table th { background: var(--bg); font-weight: 600; color: var(--text); font-size: 13px; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .actions { display: flex; gap: 4px; }

/* 分页 */
.pagination {
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--border-light);
}
.pagination-info { color: var(--text-light); font-size: 13px; }
.pagination-list { display: flex; gap: 4px; list-style: none; }
.pagination-item a {
    display: inline-block; padding: 6px 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); cursor: pointer; font-size: 13px;
    background: var(--bg-card);
}
.pagination-item a:hover { border-color: var(--primary-light); color: var(--primary); }
.pagination-item.active a { background: var(--primary); color: white; border-color: var(--primary); }
.pagination-item.disabled a { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.toast-container {
    position: fixed; top: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius);
    background: var(--bg-card); box-shadow: var(--shadow-lg);
    min-width: 240px; max-width: 400px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast-icon {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; font-weight: bold;
}
.toast.success .toast-icon { background: var(--success); }
.toast.error .toast-icon { background: var(--danger); }
.toast.warning .toast-icon { background: var(--warning); }
.toast.info .toast-icon { background: var(--info); }
.toast-message { flex: 1; font-size: 14px; color: var(--text); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    position: fixed; inset: 0;
    z-index: 1000; display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}
.modal.show {
    display: flex;
}
.modal-dialog {
    background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 500px; max-height: 90vh;
    display: flex; flex-direction: column;
    animation: modalIn 0.3s;
}
.modal-fullscreen {
    width: 100%; max-width: 100%;
    height: 100%; max-height: 100vh;
    border-radius: 0;
    overflow: hidden;
}
.modal-custom {
    position: fixed; inset: 0;
    z-index: 2000; display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}
.modal-custom.show {
    display: flex;
}
.modal-mask {
    position: absolute; inset: 0;
}
.modal-content {
    background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 500px; max-height: 90vh;
    display: flex; flex-direction: column;
    position: relative;
    animation: modalIn 0.3s;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-light); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 8px; }

/* 商品图 */
.product-img {
    width: 40px; height: 40px; border-radius: 4px;
    background: var(--bg); display: flex; align-items: center; justify-content: center;
    color: var(--text-light); font-size: 18px;
}

/* 详情 */
.detail-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.detail-section:last-child { border-bottom: none; }
.detail-section-title { font-weight: 600; margin-bottom: 12px; color: var(--text); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { display: flex; font-size: 13px; }
.detail-label { color: var(--text-light); min-width: 80px; }
.detail-value { color: var(--text); flex: 1; }

/* 时间线 */
.timeline { padding-left: 20px; border-left: 2px solid var(--border-light); }
.timeline-item { position: relative; padding: 8px 0 8px 16px; }
.timeline-item::before {
    content: ''; position: absolute; left: -7px; top: 14px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--border-light);
}
.timeline-item.active::before, .timeline-item.current::before { background: var(--primary-light); }
.timeline-item.current::before { box-shadow: 0 0 0 4px rgba(45, 138, 110, 0.2); }
.timeline-time { font-size: 12px; color: var(--text-light); }
.timeline-title { font-weight: 500; color: var(--text); }
.timeline-desc { font-size: 12px; color: var(--text-light); }

/* 响应式 */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .row-2, .row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-actions { margin-left: 0; }
}

/* 图表样式 */
.chart-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 180px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}
.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 8px;
}
.bar-wrapper {
    position: relative;
    width: 40px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 4px;
    transition: height 0.5s ease;
}
.bar-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 4px;
    white-space: nowrap;
}
.bar-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 8px;
}

.chart-pie {
    padding: 10px;
}
.pie-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.pie-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 10px;
}
.pie-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* 详情样式 */
.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}
.detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.detail-item {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}
.detail-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}
.detail-value {
    font-size: 14px;
    color: var(--text);
}
.detail-items {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 10px;
}
.detail-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-item-img {
    display: flex;
    align-items: center;
    flex: 1;
}
.detail-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
}
.detail-info {
    flex: 1;
}
.detail-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}
.detail-spec {
    font-size: 12px;
    color: var(--text-light);
}
.detail-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
    margin-right: 16px;
}
.detail-qty {
    font-size: 13px;
    color: var(--text-light);
}
.detail-total {
    display: flex;
    justify-content: flex-end;
    padding: 12px 0;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    font-size: 14px;
}

/* 列表组样式 */
.list-group li {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}
.list-group li:hover {
    background: var(--bg-secondary);
}
.list-group li:last-child {
    border-bottom: none;
}
.list-item-left {
    display: flex;
    align-items: center;
    flex: 1;
}
.list-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}
.list-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}
.list-item-center {
    flex: 1;
    padding: 0 12px;
}
.list-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.list-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}
.list-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.list-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
}

/* 商品图片 */
.product-img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

/* 角色标签 */
.role-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.role-admin { background: rgba(26, 60, 42, 0.1); color: var(--primary); }
.role-supplier { background: rgba(250, 173, 20, 0.1); color: var(--warning); }
.role-customer { background: rgba(24, 144, 255, 0.1); color: var(--info); }

/* 权限显示区域 */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}
.permission-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
.permission-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.permission-card.admin {
    border-top: 4px solid var(--primary);
}
.permission-card.supplier {
    border-top: 4px solid var(--warning);
}
.permission-card.customer {
    border-top: 4px solid var(--info);
}
.permission-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}
.permission-icon {
    font-size: 24px;
}
.permission-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.permission-body {
    padding: 16px 20px;
}
.permission-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.permission-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px dashed var(--border-light);
}
.permission-list li:last-child {
    border-bottom: none;
}
.permission-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    background: var(--success);
}
.permission-list li:contains('✗')::before {
    background: var(--text-light);
}
.permission-list li span:first-child {
    margin-right: 8px;
}

/* 订单权限标签 */
.order-permit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.order-permit.allow {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}
.order-permit.deny {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}
.order-permit .icon {
    font-size: 10px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b8075' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 40px;
}

.custom-select:hover {
    border-color: var(--primary-light);
}

.custom-select-value {
    flex: 1;
    text-align: left;
    color: var(--text);
}

.custom-select-arrow {
    color: var(--text-light);
    font-size: 12px;
    transition: transform 0.3s;
}

.custom-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.custom-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-dropdown-item:hover {
    background: var(--bg);
}

.custom-dropdown-item .dropdown-item-text {
    flex: 1;
    text-align: left;
}

.custom-dropdown-item .dropdown-item-delete {
    color: var(--danger);
    font-size: 18px;
    font-weight: bold;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 8px;
    transition: opacity 0.2s;
}

.custom-dropdown-item .dropdown-item-delete:hover {
    opacity: 1;
}

.custom-dropdown-add {
    color: var(--primary-light);
    font-weight: 500;
}

.custom-dropdown-add-input {
    padding: 10px 16px;
    border-top: 1px solid var(--border-light);
}

.custom-dropdown-add-input input {
    margin-bottom: 0 !important;
}

/* 文件上传区域 */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg);
}
.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(26, 60, 42, 0.05);
}
.upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.upload-text {
    font-size: 14px;
    color: var(--text-light);
}

/* 图片预览 */
.image-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 150px;
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--primary);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.remove-image:hover {
    background: rgba(255, 77, 79, 0.8);
}
