/* CloudAdmin - Custom Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { height: 100%; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; }

/* Layout */
.ca-layout { display: flex; height: 100vh; overflow: hidden; }
.ca-sidebar { width: 220px; height: 100vh; background: #1d1e2c; transition: width 0.3s; overflow: hidden; flex-shrink: 0; display: flex; flex-direction: column; }
.ca-sidebar.collapsed { width: 64px; }
.ca-sidebar .logo { height: 56px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; background: #161726; letter-spacing: 2px; white-space: nowrap; overflow: hidden; }
.ca-sidebar .logo .logo-icon { font-size: 24px; margin-right: 8px; }
.ca-sidebar .logo .logo-text { transition: opacity 0.3s; }
.ca-sidebar.collapsed .logo .logo-text { opacity: 0; width: 0; }
.ca-sidebar .el-menu { border-right: none; flex: 1; overflow-y: auto; overflow-x: hidden; }
.ca-sidebar .el-menu::-webkit-scrollbar { width: 0; }

/* Dark sidebar menu */
.ca-sidebar .el-menu { background-color: #1d1e2c; }
.ca-sidebar .el-menu-item, .ca-sidebar .el-sub-menu__title { color: #bfcbd9; }
.ca-sidebar .el-menu-item:hover, .ca-sidebar .el-sub-menu__title:hover { background-color: #263445; }
.ca-sidebar .el-menu-item.is-active { color: #409eff; background-color: #263445; }
.ca-sidebar .el-sub-menu .el-menu-item { background-color: #161726; }
.ca-sidebar .el-sub-menu .el-menu-item:hover { background-color: #263445; }

/* Header */
.ca-header { height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 1px 4px rgba(0,21,41,.08); z-index: 10; flex-shrink: 0; }
.ca-header .header-left { display: flex; align-items: center; }
.ca-header .header-right { display: flex; align-items: center; gap: 16px; }
.ca-header .collapse-btn { font-size: 20px; cursor: pointer; color: #606266; transition: color 0.3s; }
.ca-header .collapse-btn:hover { color: #409eff; }
.ca-header .breadcrumb-area { margin-left: 16px; }
.ca-header .avatar-area { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.ca-header .avatar-area .el-avatar { width: 32px; height: 32px; }

/* Main Content */
.ca-main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f0f2f5; }
.ca-main { flex: 1; overflow-y: auto; padding: 20px; }

/* Tags View */
.ca-tags-view { height: 34px; background: #fff; border-bottom: 1px solid #d8dce5; display: flex; align-items: center; padding: 0 12px; overflow-x: auto; }
.ca-tags-view .el-tag { margin-right: 6px; cursor: pointer; }

/* Page common */
.page-container { background: #fff; border-radius: 4px; padding: 20px; min-height: calc(100vh - 180px); }
.page-header { margin-bottom: 16px; }
.page-header h3 { font-size: 18px; font-weight: 600; color: #303133; }
.search-bar { margin-bottom: 16px; padding: 18px; background: #fafafa; border-radius: 4px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.search-bar .el-form-item { margin-bottom: 0; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.table-toolbar .toolbar-left { display: flex; gap: 8px; }
.pagination-area { display: flex; justify-content: flex-end; margin-top: 16px; }

/* Dashboard */
.dashboard-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.stat-card .stat-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; }
.stat-card .stat-info { flex: 1; }
.stat-card .stat-info .stat-label { font-size: 14px; color: #909399; margin-bottom: 4px; }
.stat-card .stat-info .stat-value { font-size: 26px; font-weight: 700; color: #303133; }
.stat-card .stat-info .stat-trend { font-size: 12px; color: #67c23a; margin-top: 4px; }
.stat-card .stat-info .stat-trend.down { color: #f56c6c; }
.stat-icon.blue { background: linear-gradient(135deg, #409eff, #79bbff); }
.stat-icon.green { background: linear-gradient(135deg, #67c23a, #95d475); }
.stat-icon.orange { background: linear-gradient(135deg, #e6a23c, #eebe77); }
.stat-icon.red { background: linear-gradient(135deg, #f56c6c, #fab6b6); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.chart-card h4 { font-size: 15px; font-weight: 600; color: #303133; margin-bottom: 16px; }

/* Login */
.login-container { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1d1e2c 0%, #2d3748 50%, #1a365d 100%); }
.login-box { width: 420px; background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-box h2 { text-align: center; margin-bottom: 8px; color: #303133; font-size: 24px; }
.login-box .login-subtitle { text-align: center; color: #909399; margin-bottom: 30px; font-size: 14px; }
.login-box .el-button { width: 100%; }

/* Settings form */
.settings-form { max-width: 600px; }
.settings-form .el-form-item { margin-bottom: 20px; }

/* Tree / Relation */
.tree-container { padding: 20px; }

/* Responsive */
@media (max-width: 1200px) {
  .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dashboard-cards { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
}

/* Scrollbar */
.ca-main::-webkit-scrollbar { width: 6px; }
.ca-main::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 3px; }
.ca-main::-webkit-scrollbar-track { background: transparent; }

/* Table image */
.el-table .goods-img { width: 50px; height: 50px; border-radius: 4px; object-fit: cover; }

/* Status tags */
.status-tag { display: inline-block; }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: #909399; }
.empty-state i { font-size: 48px; margin-bottom: 16px; }

/* Menu Group Title */
.menu-group-title { font-size: 12px; font-weight: 700; color: #909399; text-transform: uppercase; letter-spacing: 1px; }
.ca-sidebar .el-menu-item-group__title { padding: 10px 0 4px 20px !important; font-size: 12px !important; color: #606266 !important; font-weight: 600; }
.ca-sidebar .el-menu-item-group .el-menu-item { padding-left: 36px !important; font-size: 13px; }
.ca-sidebar .el-menu-item-group .el-menu-item::before { content: '·'; margin-right: 6px; color: #606266; }

/* Refund row highlighting */
.el-table .row-refund-warning {
  background-color: #fdf6ec !important;
}
.el-table .row-refund-done {
  background-color: #fef0f0 !important;
}

/* === MSF Order Page - 简洁风格 === */
.msf-order-page { padding: 0; background: #f0f2f5; min-height: calc(100vh - 60px); }
.msf-order-page .page-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: #fff; border-bottom: 1px solid #ebeef5; }
.msf-order-page .page-title { margin: 0; font-size: 18px; font-weight: 600; color: #303133; }
.msf-order-page .header-right { display: flex; align-items: center; }
.msf-order-page .order-tabs { background: #fff; padding: 0 24px; border-bottom: 1px solid #ebeef5; }
.msf-order-page .order-tabs .el-tabs__nav-wrap::after { display: none !important; }
.msf-order-page .order-tabs .el-tabs__item { font-size: 14px; font-weight: 500; height: 48px; line-height: 48px; }
.msf-order-page .order-tabs .el-tabs__item.is-active { color: #409EFF; font-weight: 600; }
.msf-order-page .order-tabs .el-tabs__active-bar { background-color: #409EFF; }
.msf-order-page .tab-count { font-size: 12px; color: #909399; margin-left: 2px; }
.msf-order-page .toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: #fff; border-bottom: 1px solid #f0f0f0; }
.msf-order-page .toolbar-left { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.msf-order-page .toolbar-right { color: #909399; font-size: 13px; }
.msf-order-page .selected-info { color: #409EFF; }
.msf-order-page .selected-info b { color: #f56c6c; }
/* 表格商品列 */
.msf-order-page .goods-cell { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; }
.msf-order-page .goods-thumb { width: 56px; height: 56px; border-radius: 6px; flex-shrink: 0; border: 1px solid #f0f0f0; cursor: pointer; }
.msf-order-page .goods-thumb-placeholder { width: 56px; height: 56px; border-radius: 6px; flex-shrink: 0; background: #f5f7fa; display: flex; align-items: center; justify-content: center; border: 1px solid #ebeef5; }
.msf-order-page .goods-info { flex: 1; min-width: 0; }
.msf-order-page .goods-name { font-size: 13px; line-height: 1.5; color: #303133; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 2px; }
.msf-order-page .goods-spec { font-size: 12px; color: #909399; }
/* 单价数量 */
.msf-order-page .price-cell { text-align: center; }
.msf-order-page .price-val { display: block; font-size: 14px; color: #303133; font-weight: 500; }
.msf-order-page .qty-val { display: block; font-size: 12px; color: #909399; margin-top: 4px; }
/* 买家 */
.msf-order-page .buyer-cell { }
.msf-order-page .buyer-name { font-size: 13px; color: #303133; font-weight: 500; }
.msf-order-page .buyer-phone { font-size: 12px; color: #909399; margin-top: 2px; }
/* 地址 */
.msf-order-page .address-cell { }
.msf-order-page .addr-main { font-size: 13px; color: #303133; margin-bottom: 2px; }
.msf-order-page .addr-detail { font-size: 12px; color: #909399; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
/* 金额 */
.msf-order-page .amount-cell { text-align: right; }
.msf-order-page .amount-main { font-size: 18px; font-weight: 700; color: #f56c6c; display: block; }
.msf-order-page .amount-sub { font-size: 11px; color: #909399; margin-top: 2px; }
/* 订单时间 */
.msf-order-page .order-time-cell { }
.msf-order-page .order-time { font-size: 12px; color: #606266; }
.msf-order-page .order-no { font-size: 11px; color: #409EFF; margin-top: 4px; font-family: monospace; word-break: break-all; }
/* 状态 */
.msf-order-page .express-info { font-size: 11px; color: #67c23a; margin-top: 4px; display: flex; align-items: center; gap: 2px; }
/* 操作列 */
.msf-order-page .action-cell { text-align: center; }
.msf-order-page .action-btns { display: flex; flex-direction: column; gap: 2px; }
.msf-order-page .action-btns .el-button { font-size: 13px; }
/* 分页 */
.msf-order-page .pagination-bar { display: flex; justify-content: flex-end; padding: 16px 24px; background: #fff; }
/* 详情抽屉 */
.msf-order-page .detail-content { padding: 0 4px; }
.msf-order-page .detail-section { margin-bottom: 20px; }
.msf-order-page .detail-section-title { font-size: 15px; font-weight: 600; color: #303133; margin: 0 0 12px 0; padding-left: 8px; border-left: 3px solid #409EFF; }
.msf-order-page .detail-money-row { display: flex; gap: 24px; padding: 16px; background: #fafafa; border-radius: 8px; }
.msf-order-page .money-item { text-align: center; flex: 1; }
.msf-order-page .money-label { display: block; font-size: 12px; color: #909399; margin-bottom: 6px; }
.msf-order-page .money-value { font-size: 16px; font-weight: 600; color: #303133; }
.msf-order-page .money-item.highlight .money-value-big { font-size: 22px; font-weight: 700; color: #f56c6c; }
/* 通用表格覆盖 */
.msf-order-page .el-table { background: #fff; }
.msf-order-page .el-table th.el-table__cell { font-size: 13px !important; }
.msf-order-page .el-table td.el-table__cell { font-size: 13px; }

