/* ============================================================
   来财 iOS · 控制台布局 v3
   目标：简洁明了、层级清楚、点得到、看得清
   加载在 brand.css / ui-fix.css 之后（最后加载，优先级最高）
   ============================================================ */

:root{
  --lc-bg:#0B1218;
  --lc-panel:#111B24;
  --lc-panel-2:#0E1720;
  --lc-line:rgba(255,255,255,.07);
  --lc-line-strong:rgba(0,229,160,.22);
  --lc-text:#E6F1F7;
  --lc-text-2:#A9BAC8;
  --lc-text-3:#7D8FA0;
  --lc-accent:#00E5A0;
  --lc-accent-2:#25B4FF;
  --lc-radius:12px;
  --lc-sider:220px;
}

/* ---------- 1. 整体骨架 ---------- */
html,body{background:var(--lc-bg) !important;color:var(--lc-text) !important;}
.ant-pro-layout,
.ant-layout{background:var(--lc-bg) !important;}

/* 侧栏 */
.ant-pro-layout .ant-layout-sider,
.ant-layout-sider.ant-pro-sider{
  width:var(--lc-sider) !important;
  min-width:var(--lc-sider) !important;
  max-width:var(--lc-sider) !important;
  flex:0 0 var(--lc-sider) !important;
  background:linear-gradient(180deg,#0D1721 0%,#0A121A 100%) !important;
  border-right:1px solid var(--lc-line) !important;
}
.ant-pro-layout .ant-layout-sider .ant-layout-sider-children{padding:10px 8px 16px !important;}
/* 品牌区 */
.ant-pro-layout .ant-pro-sider-logo,
.ant-pro-layout .ant-pro-global-header-logo{height:52px !important;padding:0 10px !important;}
.ant-pro-layout .ant-pro-sider-logo h1,
.ant-pro-layout .ant-pro-sider-logo a{color:#fff !important;font-size:15px !important;letter-spacing:.4px;}

/* 顶栏 */
.ant-layout-header{height:52px !important;line-height:52px !important;background:rgba(11,18,24,.86) !important;
  border-bottom:1px solid var(--lc-line) !important;backdrop-filter:blur(10px);}
.ant-pro-layout .ant-pro-layout-content,
.ant-layout-content.ant-pro-layout-content{padding:16px 18px !important;min-height:calc(100vh - 52px) !important;}

/* ---------- 2. 侧边菜单 ---------- */
.ant-pro-sider-menu.ant-menu{background:transparent !important;border-inline-end:none !important;font-size:13.5px !important;}
.ant-pro-sider-menu .ant-menu-item,
.ant-pro-sider-menu .ant-menu-submenu-title{
  height:38px !important;line-height:38px !important;
  margin:2px 0 !important;padding:0 12px !important;
  border-radius:9px !important;
  color:var(--lc-text-2) !important;
  font-weight:500;
}
.ant-pro-sider-menu .ant-menu-item .anticon,
.ant-pro-sider-menu .ant-menu-submenu-title .anticon{font-size:15px !important;color:#8FA3B4 !important;transition:color .15s;}
.ant-pro-sider-menu .ant-menu-item:hover,
.ant-pro-sider-menu .ant-menu-submenu-title:hover{background:rgba(255,255,255,.05) !important;color:#fff !important;}
.ant-pro-sider-menu .ant-menu-item:hover .anticon,
.ant-pro-sider-menu .ant-menu-submenu-title:hover .anticon{color:var(--lc-accent) !important;}
.ant-pro-sider-menu .ant-menu-item-selected{
  background:linear-gradient(90deg,rgba(0,229,160,.18),rgba(37,180,255,.06)) !important;
  color:#EAFFF7 !important;font-weight:600;
  box-shadow:inset 0 0 0 1px rgba(0,229,160,.22);
  position:relative;
}
.ant-pro-sider-menu .ant-menu-item-selected::before{
  content:'';position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;
  background:linear-gradient(180deg,var(--lc-accent),var(--lc-accent-2));
}
.ant-pro-sider-menu .ant-menu-item-selected .anticon{color:var(--lc-accent) !important;}
/* 子菜单缩进收敛，避免层级过深 */
.ant-pro-sider-menu .ant-menu-sub.ant-menu-inline{padding-left:6px !important;}
.ant-pro-sider-menu .ant-menu-sub .ant-menu-item{height:34px !important;line-height:34px !important;padding-left:40px !important;font-size:13px !important;}
.ant-pro-sider-menu .ant-menu-submenu-open > .ant-menu-submenu-title{color:#fff !important;}

/* 折叠按钮 */
.ant-pro-sider .ant-pro-sider-collapsed-button{background:rgba(255,255,255,.05) !important;border:1px solid var(--lc-line) !important;}

/* ---------- 3. 页头/容器 ---------- */
.ant-pro-page-container{padding:0 !important;}
.ant-pro-page-container .ant-pro-page-container-warp-page-header{background:transparent !important;padding:0 0 10px !important;border:none !important;}
.ant-pro-page-container .ant-page-header-heading-title{font-size:17px !important;font-weight:600 !important;color:#fff !important;}
.ant-pro-page-container .ant-page-header-heading-sub-title{color:var(--lc-text-3) !important;font-size:12.5px !important;}
.ant-pro-grid-content{max-width:none !important;}

/* ---------- 4. 卡片 ---------- */
.ant-card,.ant-pro-card{
  background:linear-gradient(180deg,#121D27,#0F1821) !important;
  border:1px solid var(--lc-line) !important;
  border-radius:var(--lc-radius) !important;
  box-shadow:0 6px 20px rgba(0,0,0,.28) !important;
}
.ant-card-body,.ant-pro-card-body{padding:16px !important;}
.ant-card-head{min-height:46px !important;border-bottom:1px solid var(--lc-line) !important;padding:0 16px !important;}
.ant-card-head-title{font-size:14px !important;font-weight:600 !important;color:#EAF6FF !important;}
.ant-card-head .ant-tabs-tab{font-size:13px !important;}

/* 卡片间距统一 */
.ant-row > div > .ant-card,
.ant-row > div > .ant-pro-card{margin-bottom:14px;}
.ant-col > .ant-card{margin-bottom:0;}

/* ---------- 5. 表格 ---------- */
.ant-table{background:transparent !important;font-size:13px !important;}
.ant-table-thead > tr > th{
  background:#15212C !important;color:#C6D8E5 !important;font-weight:600 !important;
  border-bottom:1px solid var(--lc-line) !important;
  padding:10px 12px !important;white-space:nowrap;
}
.ant-table-thead > tr > th::before{display:none !important;}
.ant-table-tbody > tr > td{
  padding:10px 12px !important;border-bottom:1px solid rgba(255,255,255,.05) !important;color:var(--lc-text) !important;
}
.ant-table-tbody > tr:hover > td{background:rgba(0,229,160,.06) !important;}
.ant-table-tbody > tr.ant-table-row-selected > td{background:rgba(0,229,160,.10) !important;}
.ant-table-placeholder:hover > td{background:transparent !important;}
.ant-table-cell-scrollbar{box-shadow:none !important;}
.ant-table-container{border-radius:10px !important;}
.ant-table summary,.ant-table small,.ant-table .ant-typography-secondary{color:var(--lc-text-2) !important;}

/* ---------- 6. 查询区（ProTable search） ---------- */
.ant-pro-table-search,
.ant-pro-card.ant-pro-table-search{
  margin-bottom:14px !important;padding:14px 16px 4px !important;
  background:linear-gradient(180deg,#111C26,#0E1720) !important;
  border:1px solid var(--lc-line) !important;border-radius:var(--lc-radius) !important;
}
.ant-pro-query-filter.ant-form{row-gap:12px !important;}
.ant-pro-query-filter .ant-form-item{margin-bottom:12px !important;}
.ant-pro-query-filter .ant-form-item-label{padding-bottom:4px !important;}
.ant-pro-query-filter .ant-form-item-label > label{color:var(--lc-text-2) !important;font-size:12.5px !important;}
.ant-pro-query-filter .ant-form-item-control-input{min-height:34px !important;}

/* ---------- 7. 工具栏 ---------- */
.ant-pro-table-list-toolbar{padding:0 0 12px !important;}
.ant-pro-table-list-toolbar-container{padding:0 !important;gap:10px;}
.ant-pro-table-list-toolbar-title{font-size:14px !important;font-weight:600 !important;color:#E6F1F7 !important;}
.ant-pro-table-list-toolbar-search input{width:220px !important;}

/* ---------- 8. 表单 / 输入 ---------- */
.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,textarea.ant-input,
.ant-select-selector,.ant-input-number-input{
  background:var(--lc-panel-2) !important;
  border:1px solid #24384A !important;
  border-radius:8px !important;
  color:var(--lc-text) !important;
  min-height:34px !important;
  transition:border-color .15s,box-shadow .15s;
}
.ant-input:hover,.ant-input-affix-wrapper:hover,.ant-input-number:hover,.ant-picker:hover,
.ant-select:hover .ant-select-selector{border-color:#33536B !important;}
.ant-input:focus,.ant-input-affix-wrapper:focus-within,.ant-input-number-focused,.ant-picker-focused,
.ant-select-focused .ant-select-selector{
  border-color:var(--lc-accent) !important;
  box-shadow:0 0 0 2px rgba(0,229,160,.16) !important;
}
.ant-input::placeholder,.ant-select-selection-placeholder{color:#6C8091 !important;}
.ant-form-item-label > label{color:var(--lc-text-2) !important;font-size:13px !important;}
.ant-form-item{margin-bottom:18px !important;}
.ant-form-item-explain-error{font-size:12px !important;}

/* 设置类页面：卡片内表单更舒展、开关靠右 */
.ant-card .ant-form-item{display:flex;align-items:flex-start;gap:12px;}
.ant-card .ant-form-item-row{flex:1;}
.ant-card .ant-form-item-control{min-width:0;}

/* 开关 */
.ant-switch{background:#2A3B4B !important;}
.ant-switch.ant-switch-checked{background:linear-gradient(90deg,var(--lc-accent),#12C6C6) !important;}

/* ---------- 9. 按钮 ---------- */
.ant-btn{border-radius:8px !important;height:34px !important;padding:0 14px !important;font-size:13px !important;font-weight:500;}
.ant-btn-primary{
  background:linear-gradient(90deg,#00D293,#12B8D6) !important;border:none !important;color:#04140F !important;
  box-shadow:0 4px 14px rgba(0,229,160,.22) !important;font-weight:600 !important;
}
.ant-btn-primary:hover{filter:brightness(1.08);}
.ant-btn-default{background:rgba(255,255,255,.04) !important;border:1px solid #2A3E50 !important;color:var(--lc-text) !important;}
.ant-btn-default:hover{border-color:var(--lc-accent) !important;color:var(--lc-accent) !important;}
.ant-btn-link,.ant-btn-text{padding:0 6px !important;}
.ant-btn-sm{height:28px !important;padding:0 10px !important;font-size:12.5px !important;}

/* ---------- 10. 弹窗 / 抽屉 / 下拉 ---------- */
.ant-modal-content,.ant-drawer-content,.ant-popover-inner,.ant-dropdown-menu,
.ant-select-dropdown,.ant-picker-panel-container{
  background:linear-gradient(180deg,#13202B,#0E1720) !important;
  border:1px solid var(--lc-line) !important;border-radius:14px !important;
  box-shadow:0 18px 50px rgba(0,0,0,.55) !important;
}
.ant-modal-header{background:transparent !important;border-bottom:1px solid var(--lc-line) !important;padding:14px 18px !important;}
.ant-modal-title{font-size:15px !important;font-weight:600 !important;color:#fff !important;}
.ant-modal-body{padding:18px !important;}
.ant-modal-footer{border-top:1px solid var(--lc-line) !important;padding:12px 18px !important;}
.ant-dropdown-menu-item{color:var(--lc-text) !important;border-radius:8px !important;}
.ant-dropdown-menu-item:hover{background:rgba(0,229,160,.10) !important;}
.ant-select-item-option-selected{background:rgba(0,229,160,.14) !important;color:#EAFFF7 !important;}

/* ---------- 11. 标签 / 状态 / 其他 ---------- */
.ant-tag{border-radius:6px !important;font-size:12px !important;padding:1px 8px !important;}
.ant-tag-blue{background:rgba(37,180,255,.14) !important;border-color:rgba(37,180,255,.35) !important;color:#8FD4FF !important;}
.ant-tag-green,.ant-tag-success{background:rgba(0,229,160,.14) !important;border-color:rgba(0,229,160,.35) !important;color:#6BFFCB !important;}
.ant-tag-red,.ant-tag-error{background:rgba(255,86,86,.14) !important;border-color:rgba(255,86,86,.35) !important;color:#FF9A9A !important;}
.ant-tag-gold,.ant-tag-orange,.ant-tag-warning{background:rgba(255,183,77,.14) !important;border-color:rgba(255,183,77,.35) !important;color:#FFC978 !important;}
.ant-tag-default,.ant-tag:not([class*="ant-tag-"]){background:rgba(255,255,255,.06) !important;border-color:var(--lc-line) !important;color:var(--lc-text-2) !important;}

.ant-empty-description,.ant-empty-normal{color:var(--lc-text-3) !important;}
.ant-descriptions-item-label{color:var(--lc-text-2) !important;}
.ant-descriptions-item-content{color:var(--lc-text) !important;}
.ant-divider{border-color:var(--lc-line) !important;}
.ant-breadcrumb,.ant-breadcrumb a{color:var(--lc-text-3) !important;}
.ant-typography,.ant-typography p{color:var(--lc-text) !important;}
.ant-statistic-title{color:var(--lc-text-2) !important;font-size:12.5px !important;}
.ant-statistic-content{color:#fff !important;font-size:22px !important;}
.ant-pagination-item,.ant-pagination-prev,.ant-pagination-next{background:transparent !important;border-color:var(--lc-line) !important;}
.ant-pagination-item a{color:var(--lc-text-2) !important;}
.ant-pagination-item-active{background:rgba(0,229,160,.14) !important;border-color:var(--lc-accent) !important;}
.ant-pagination-item-active a{color:#EAFFF7 !important;}

/* 滚动条 */
::-webkit-scrollbar{width:9px;height:9px;}
::-webkit-scrollbar-thumb{background:#22323F;border-radius:6px;}
::-webkit-scrollbar-thumb:hover{background:#2E4356;}
::-webkit-scrollbar-track{background:transparent;}

/* ---------- 12. 移动端 ---------- */
@media (max-width:768px){
  :root{--lc-sider:0px;}
  .ant-layout-header{height:48px !important;line-height:48px !important;}
  .ant-pro-layout .ant-pro-layout-content,.ant-layout-content.ant-pro-layout-content{padding:12px !important;}
  .ant-card-body,.ant-pro-card-body{padding:12px !important;}
  .ant-pro-query-filter .ant-form-item{margin-bottom:10px !important;}
  .ant-pro-table-list-toolbar-container{flex-wrap:wrap;row-gap:8px;}
  .ant-pro-table-list-toolbar-search input{width:100% !important;}
  .ant-table{font-size:12.5px !important;}
  .ant-table-thead > tr > th,.ant-table-tbody > tr > td{padding:8px 10px !important;}
  .ant-btn{height:32px !important;}
}

/* ---------- 13. 悬浮工具入口：收成小标签，避免压住分页 ---------- */
#lc-tool-dock{
  position:fixed !important;right:16px !important;bottom:16px !important;z-index:9998;
  display:flex;flex-direction:column;gap:8px;align-items:flex-end;
}
#lc-tool-dock .lc-dock-btn{
  height:32px;padding:0 12px;border-radius:16px;cursor:pointer;
  background:rgba(0,229,160,.10);border:1px solid rgba(0,229,160,.35);
  color:#9FFFDD;font-size:12.5px;line-height:30px;user-select:none;
  backdrop-filter:blur(8px);transition:background .15s,transform .15s;
}
#lc-tool-dock .lc-dock-btn:hover{background:rgba(0,229,160,.20);transform:translateY(-1px);}

/* ============ v3.1 细化（按逐页视觉检查结果修） ============ */

/* 1) 查询区更紧凑：控件定宽，别拉满整行 */
.ant-pro-query-filter .ant-form-item{margin-bottom:10px !important;}
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-input,
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-input-affix-wrapper,
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-select,
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-picker,
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-input-number{max-width:240px !important;width:240px !important;}
.ant-pro-query-filter .ant-form-item-control-input-content > .ant-space,
.ant-pro-query-filter .ant-form-item-control-input-content > div[class*="flex"]{gap:8px !important;}
.ant-pro-table-search{padding:12px 16px 2px !important;}

/* 2) 表格：长内容省略 + 可横滑，不再生硬截断 */
.ant-table-container{border-radius:10px !important;}
.ant-table-body,.ant-table-content{overflow-x:auto !important;}
.ant-table-tbody > tr > td{
  max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.ant-table-thead > tr > th{max-width:280px;overflow:hidden;text-overflow:ellipsis;}
/* 允许「操作」列不被压缩 */
.ant-table-tbody > tr > td:last-child{max-width:none;overflow:visible;}

/* 3) 次要文字整体提亮一档，占位符别太暗 */
:root{--lc-text-3:#8598AA;}
.ant-input::placeholder,.ant-select-selection-placeholder,textarea.ant-input::placeholder{color:#7E92A4 !important;}
.ant-form-item-extra,.ant-form-item-explain,.ant-typography-secondary,
.ant-pro-table-list-toolbar .ant-typography,.ant-empty-description{color:#8FA2B3 !important;}

/* 4) 设置类页面：卡片内表单更紧凑，说明文字与控件对齐 */
.ant-card .ant-form-item{margin-bottom:14px !important;}
.ant-card .ant-form-item-label{flex:0 0 auto;}
.ant-card .ant-form-item-label > label{white-space:nowrap;}
.ant-card + .ant-card{margin-top:2px;}
.ant-card .ant-divider-horizontal{margin:14px 0 !important;}

/* 5) 列表/详情里的键值对更紧凑 */
.ant-descriptions-item{padding-bottom:10px !important;}
.ant-descriptions-small .ant-descriptions-item-label,
.ant-descriptions-small .ant-descriptions-item-content{font-size:12.5px !important;}

/* 6) 顶栏/侧栏对齐修正（fixed sider 宽 220，内容左移对齐） */
.ant-pro-layout .ant-pro-layout-content,
.ant-layout-content.ant-pro-layout-content{margin-left:0 !important;}
.ant-layout-header{margin-left:0 !important;}

@media (min-width:993px){
  .ant-pro-layout .ant-pro-layout-content{padding-left:18px !important;}
}

/* ============ v3.2：宽表体验（操作列吸附）+ 排版细修 ============ */

/* 1) 操作列右侧吸附：宽表横向滚动时，操作按钮始终可见 */
.ant-table-thead > tr > th:last-child{
  position:sticky !important;right:0;z-index:3 !important;
  background:#15212C !important;
  box-shadow:-8px 0 12px -8px rgba(0,0,0,.65);
}
.ant-table-tbody > tr > td:last-child{
  position:sticky !important;right:0;z-index:2 !important;
  background:#111C26 !important;max-width:none !important;overflow:visible !important;
  white-space:normal !important;
  box-shadow:-8px 0 12px -8px rgba(0,0,0,.65);
}
.ant-table-tbody > tr:hover > td:last-child{background:#15242F !important;}
.ant-table-tbody > tr > td:last-child .ant-btn{margin:2px 4px 2px 0;}

/* 2) 表格横滑条始终可见（提示还有内容） */
.ant-table-content::-webkit-scrollbar,.ant-table-body::-webkit-scrollbar{height:8px;background:rgba(255,255,255,.04);}
.ant-table-content::-webkit-scrollbar-thumb,.ant-table-body::-webkit-scrollbar-thumb{background:#2C4256;border-radius:8px;}
.ant-table-content::-webkit-scrollbar-thumb:hover,.ant-table-body::-webkit-scrollbar-thumb:hover{background:#3A5876;}

/* 3) 顶栏内距，图标别贴边 */
.ant-layout-header .ant-pro-global-header{padding-inline:12px !important;}
.ant-pro-global-header-logo{padding-left:4px !important;}

/* 4) 查询区按钮靠右、与输入框同一行节奏 */
.ant-pro-query-filter .ant-form-item:last-child,
.ant-pro-query-filter .ant-form-item:last-child .ant-form-item-control-input-content{display:flex !important;justify-content:flex-end !important;align-items:center;gap:8px;}
.ant-pro-query-filter .ant-form-item:last-child{margin-left:auto !important;}

/* 5) 次要文字再提亮一档（说明文字 / 卡片描述 / 图表图例） */
:root{--lc-text-3:#93A7B8;}
.ant-pro-card .ant-typography-secondary,.ant-card-extra,.ant-pro-card-subtitle,
.ant-form-item-extra,.ant-typography small{color:#93A7B8 !important;}
.ant-pro-page-container .ant-page-header-heading-sub-title{color:#93A7B8 !important;}

/* 6) 指标卡（仪表盘）更紧凑 */
.ant-pro-card-statistic .ant-statistic-content-value,
.ant-pro-card-statistic-content{font-size:24px !important;font-weight:700 !important;color:#EAF6FF !important;}
.ant-pro-card-statistic .ant-statistic-title{font-size:12.5px !important;color:#9FB2C2 !important;}

/* ============ v3.3 ============ */
/* 工具入口已并入侧边栏菜单，隐藏右下角悬浮球，避免遮挡表格数据 */
#lc-tools{display:none !important;}
/* 操作列最小宽度，按钮不被挤断 */
.ant-table-tbody > tr > td:last-child{min-width:112px !important;}
.ant-table-thead > tr > th:last-child{min-width:112px !important;}

/* 工具入口：右上角小圆钮，不遮挡表格与分页 */
#lc-tools{display:block !important;position:fixed !important;right:16px !important;top:64px !important;bottom:auto !important;z-index:9999;}
#lc-tools > button{
  width:38px !important;height:38px !important;border-radius:10px !important;font-size:12px !important;
  background:rgba(17,28,38,.92) !important;border:1px solid rgba(0,229,160,.35) !important;color:#7FF0C8 !important;
  box-shadow:0 8px 22px -10px rgba(0,0,0,.9) !important;opacity:.85;
}
#lc-tools > button:hover{opacity:1;}
#lc-tools > div{top:44px !important;bottom:auto !important;right:0 !important;}
