/* ==========================================================
   cdh-admin.css —— 后台简约风（Halo 风格）v0.2.0
   暗色侧栏 #232838 + 薄荷青主色 + 浅灰工作区 + 圆角卡片
   ========================================================== */

/* ---------- 工作区底色 ---------- */
body.wp-admin{background:#F5F7FA}
body.wp-admin #wpcontent,body.wp-admin #wpbody{background:transparent}
body.wp-admin a{color:#227A6B}
body.wp-admin .wrap h1{font-weight:700;letter-spacing:.3px}
body.wp-admin .wrap h2{font-weight:700}

/* ---------- 左侧暗色菜单 ---------- */
body.wp-admin #adminmenuback,
body.wp-admin #adminmenuwrap,
body.wp-admin #adminmenu{background:#232838 !important}
#adminmenu li a,#adminmenu div.wp-menu-image:before{color:#A9B2C3 !important}
/* 修复：确保菜单文字始终可见（展开态 & 折叠态 hover） */
#adminmenu .wp-menu-name{display:block !important;visibility:visible !important;opacity:1 !important;color:#A9B2C3 !important;position:relative !important;left:0 !important;width:auto !important;height:auto !important;overflow:visible !important;clip:auto !important;white-space:nowrap !important}
#adminmenu li.current .wp-menu-name,#adminmenu li.wp-has-current-submenu .wp-menu-name{color:#fff !important}
#adminmenu li.menu-top:hover .wp-menu-name,#adminmenu li.opensub .wp-menu-name{color:#fff !important}
/* 折叠态展开子菜单文字 */
.folded #adminmenu .wp-submenu{min-width:160px !important}
.folded #adminmenu .wp-submenu a,.auto-fold #adminmenu .wp-submenu a{color:#98A3B5 !important}
#adminmenu a.menu-top{transition:.15s}
#adminmenu li.menu-top:hover,
#adminmenu li.opensub>a.menu-top,
#adminmenu li>a.menu-top:focus{background:rgba(255,255,255,.06) !important;color:#fff !important}
#adminmenu li.menu-top:hover div.wp-menu-image:before,
#adminmenu li.opensub div.wp-menu-image:before{color:#7FD6C4 !important}
/* 当前项：薄荷青高亮 */
#adminmenu li.current a.menu-top,
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
#adminmenu li.wp-has-current-submenu.opensub a.wp-has-current-submenu{background:#2FA893 !important;color:#fff !important;border-radius:0}
#adminmenu li.current div.wp-menu-image:before,
#adminmenu li.wp-has-current-submenu div.wp-menu-image:before{color:#fff !important}
/* 二级菜单 */
#adminmenu .wp-submenu{background:#1C2130 !important}
#adminmenu .wp-submenu a{color:#98A3B5 !important}
#adminmenu .wp-submenu a:hover,
#adminmenu .wp-submenu li.current a{color:#7FD6C4 !important}
/* 折叠按钮 */
#collapse-button{color:#A9B2C3}
/* 顶栏 */
body.wp-admin #wpadminbar{background:#232838}
#wpadminbar .ab-item,#wpadminbar a.ab-item,#wpadminbar>#wp-toolbar span.ab-label,
#wpadminbar>#wp-toolbar span.noticon{color:#C4CCD8}
#wpadminbar .ab-icon:before,#wpadminbar .ab-item:before{color:#8FA0B8}
#wpadminbar:hover .ab-item,#wpadminbar a:hover .ab-label{color:#fff}
/* 返回长荡湖后台按钮 */
#wpadminbar .cdh-admin-bar-link a{background:#2FA893 !important;color:#fff !important;border-radius:6px;padding:4px 12px !important;font-weight:600;font-size:12px !important;margin-left:8px}
#wpadminbar .cdh-admin-bar-link a:hover{background:#227A6B !important}

/* ---------- 内容卡片 ---------- */
body.wp-admin .postbox{border:1px solid #E9EEF3;border-radius:14px !important;box-shadow:0 4px 16px rgba(35,50,60,.05);overflow:hidden}
body.wp-admin .postbox-header{border-bottom:1px solid #EEF2F6;background:#FBFCFD}
body.wp-admin .postbox-header h2,
body.wp-admin .postbox-header .hndle{font-weight:700;font-size:13.5px;letter-spacing:.3px}
body.wp-admin .inside{padding:16px 18px}
/* 仪表盘：单列全宽，卡片堆叠 */
body.wp-admin #dashboard-widgets .postbox-container{width:100% !important}
body.wp-admin #dashboard-widgets .meta-box-sortables{min-height:0}
body.index-php .postbox .inside{padding:16px 18px}

/* ---------- 仪表盘：数据总览卡片 ---------- */
.cdh-stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}
.cdh-stat{background:#F8FAFC;border:1px solid #EEF2F6;border-radius:14px;padding:15px 14px;display:flex;gap:12px;align-items:center;transition:.18s}
.cdh-stat:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(35,50,60,.08)}
.cdh-stat .ico{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;flex:none}
.cdh-stat b.num{display:block;font-size:22px;line-height:1.15;color:#26403A;font-weight:800}
.cdh-stat span{font-size:12px;color:#6F8291}
.cdh-stat-foot{margin-top:16px;font-size:12.5px;color:#6F8291}
.cdh-stat-foot a{color:#227A6B;font-weight:600;text-decoration:none;margin-right:4px}

/* ---------- 仪表盘：列表面板 ---------- */
ul.cdh-dash-list{margin:0}
ul.cdh-dash-list li{list-style:none;border-bottom:1px dashed #EDF1F5}
ul.cdh-dash-list li:last-child{border-bottom:0}
.cdh-dash-link{display:flex;align-items:baseline;gap:12px;padding:11px 2px;text-decoration:none;color:#26403A !important}
.cdh-dash-link .t{flex:1;font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cdh-dash-link .m{font-size:11.5px;color:#227A6B;background:#E6F5F0;padding:2px 10px;border-radius:999px;flex:none;font-weight:600}
.cdh-dash-link .d{font-size:11.5px;color:#8CA0AE;flex:none}
.cdh-dash-link:hover .t{color:#227A6B}
.cdh-dash-empty{color:#8CA0AE;font-size:13px;padding:12px 0;margin:0}
.cdh-btn{display:inline-block;background:#2FA893;color:#fff !important;border-radius:8px;padding:5px 13px;font-size:12px !important;font-weight:600;text-decoration:none}
.cdh-btn:hover{background:#227A6B}

/* ---------- 通用按钮 ---------- */
body.wp-admin .wp-core-ui .button-primary{
  background:#2FA893 !important;border:1px solid #2FA893 !important;border-radius:8px !important;
  text-shadow:none !important;box-shadow:none !important;font-weight:600}
body.wp-admin .wp-core-ui .button-primary:hover{background:#227A6B !important;border-color:#227A6B !important}
body.wp-admin .wp-core-ui .button{border-radius:8px}
/* 列表页表格 */
body.wp-admin table.wp-list-table{border-radius:12px;overflow:hidden;border:1px solid #E9EEF3}
body.wp-admin table.wp-list-table th{font-weight:700}
body.wp-admin .tablenav .button{border-radius:8px}
/* 提示条 */
body.wp-admin .notice{border-radius:10px;border:none;border-left:4px solid #2FA893;box-shadow:0 4px 14px rgba(35,50,60,.06)}

/* ---------- 登录页 ---------- */
body.login{background:#F5F7FA}
body.login #login{padding-top:12vh}
body.login h1 a{color:#227A6B;background:none;text-indent:0;overflow:visible;width:auto;height:auto;
  font-size:22px;font-weight:800;letter-spacing:1px}
body.login h1 a::before{content:"○ "}
body.login #loginform{border:1px solid #E9EEF3 !important;border-radius:16px !important;
  box-shadow:0 10px 30px rgba(35,50,60,.08) !important}
body.login .button-primary{background:#2FA893 !important;border:1px solid #2FA893 !important;border-radius:8px !important;
  text-shadow:none !important;box-shadow:none !important;font-weight:600}
body.login .button-primary:hover{background:#227A6B !important}
body.login #nav a,body.login #backtoblog a{color:#227A6B}
body.login .message{border-left-color:#2FA893;border-radius:10px}

/* ---------- 文章编辑页优化（新增 v0.2）---------- */
body.post-php #poststuff,
body.post-new-php #poststuff{padding-top:0}
body.post-php #titlediv #title,
body.post-new-php #titlediv #title{
  border-radius:10px;border:1px solid #D5DCE6;padding:10px 14px;font-size:15px;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.04)}
body.post-php #postdivrich .wp-editor-container,
body.post-new-php #postdivrich .wp-editor-container{
  border-radius:12px;overflow:hidden;border:1px solid #D5DCE6}
body.post-php .postbox .hndle,
body.post-new-php .postbox .hndle{
  background:#FBFCFD;padding:12px 16px;font-weight:700;font-size:13px;color:#26403A;
  border-bottom:1px solid #EEF2F6}
body.post-php .postbox,
body.post-new-php .postbox{
  border-radius:14px !important;border:1px solid #E9EEF3;
  box-shadow:0 4px 16px rgba(35,50,60,.05)}
/* 自定义字段 metabox */
body.post-php #cdh_goods_meta,
body.post-php #cdh_event_meta,
body.post-php #cdh_guide_meta{
  border-left:3px solid #2FA893 !important}
body.post-php #cdh_goods_meta .hndle,
body.post-php #cdh_event_meta .hndle,
body.post-php #cdh_guide_meta .hndle{
  color:#227A6B !important}

/* ---------- 媒体库优化 ---------- */
body.upload-php .media-frame{border-radius:14px;border:1px solid #E9EEF3}
body.upload-php .attachment-preview{border-radius:10px}

/* ---------- 用户列表页优化 ---------- */
body.users-php table.wp-list-table td,
body.users-php table.wp-list-table th{padding:12px 14px}
body.users-php .subsubsub a{border-radius:6px;padding:3px 10px}
body.users-php .subsubsub a.current{background:#2FA893 !important;color:#fff !important}

/* ---------- 设置页优化 ---------- */
body.options-general-php .form-table th{font-weight:600;color:#26403A}
body.options-general-php .form-table td input,
body.options-general-php .form-table td textarea,
body.options-general-php .form-table td select{
  border-radius:8px;border:1px solid #D5DCE6;padding:8px 12px}

/* ---------- 自定义器侧边栏 ---------- */
body.wp-customizer .wp-full-overlay-sidebar{background:#232838 !important}
body.wp-customizer .wp-full-overlay-sidebar .accordion-section-title{
  color:#A9B2C3 !important;border-bottom:1px solid rgba(255,255,255,.06)}
body.wp-customizer .wp-full-overlay-sidebar .accordion-section-title:hover{
  color:#fff !important;background:rgba(255,255,255,.06)}
body.wp-customizer .wp-full-overlay-sidebar .customize-section-title{
  background:#2FA893 !important;color:#fff !important}

/* ---------- 页脚版权 ---------- */
#wpfooter{background:transparent;color:#8CA0AE;font-size:11.5px}
#wpfooter a{color:#227A6B}

/* ---------- 响应式 ---------- */
@media (max-width:1100px){
  .cdh-stat-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:782px){
  body.wp-admin #adminmenuwrap{display:none}
  body.wp-admin.auto-fold #adminmenuwrap{display:block}
  .cdh-stat-grid{grid-template-columns:repeat(2,1fr)}
  .cdh-dash-link .d{display:none}
  .cdh-stat{padding:12px 10px}
  .cdh-stat .ico{width:36px;height:36px;font-size:16px}
  .cdh-stat b.num{font-size:18px}
}
@media (max-width:640px){
  .cdh-stat-grid{grid-template-columns:repeat(2,1fr)}
  .cdh-dash-link .d{display:none}
}
