/* ===== layui 之上的自定义层 ===== */
body{background:#f4f5f7}
.admin-content{padding:18px 22px}
.fr{float:right}
.muted{color:#8a93a6;font-size:12px}
.hide-sm{display:none}
@media(min-width:769px){.hide-sm{display:table-cell}}

/* ===== 侧边栏美化 ===== */
.layui-layout-admin .layui-header{background:linear-gradient(90deg,#232c3d,#1b2331);box-shadow:0 2px 10px rgba(10,16,26,.35)}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a{color:rgba(255,255,255,.82)}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a:hover{color:#fff;background:rgba(255,255,255,.08)}
.layui-logo{color:#fff;font-weight:600;letter-spacing:.5px;display:flex;align-items:center;gap:9px}
.logo-badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:7px;
  background:linear-gradient(135deg,#16b777,#0f9a8d);color:#fff;font-size:14px;
  box-shadow:0 3px 8px rgba(22,183,122,.4);
}
.layui-layout-admin .layui-side{
  background:linear-gradient(180deg,#232c3d 0%,#161d2a 100%);
  box-shadow:2px 0 12px rgba(10,16,26,.3);
}
.side-brand{
  display:flex;align-items:center;gap:9px;
  padding:18px 22px 14px;font-size:15px;font-weight:600;color:#fff;letter-spacing:1px;
  border-bottom:1px solid rgba(255,255,255,.07);margin-bottom:10px;
}
.layui-side .layui-nav-tree{background:transparent;padding:0 10px;width:auto}
.layui-side .layui-nav-tree .layui-nav-item{margin:3px 0;line-height:44px}
.layui-side .layui-nav-tree .layui-nav-item a{
  height:44px;line-height:44px;border-radius:8px;margin:0;
  color:rgba(255,255,255,.62);font-size:13.5px;
  transition:background .15s,color .15s;
}
.layui-side .layui-nav-tree .layui-nav-item a:hover{background:rgba(255,255,255,.07);color:#fff}
.layui-side .layui-nav-tree .layui-nav-item a i{margin-right:8px;font-size:15px}
.layui-side .layui-nav-tree .layui-nav-item.layui-this a{
  background:linear-gradient(90deg,rgba(22,183,122,.22),rgba(22,183,122,.05));
  color:#fff;font-weight:600;
  box-shadow:inset 3px 0 0 #16b777;
}

/* ===== 统计卡 ===== */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:16px}
.stat-card{border-radius:8px;padding:18px 20px;color:#fff;position:relative;overflow:hidden;box-shadow:0 6px 16px rgba(30,40,80,.15)}
.stat-card b{font-size:28px;font-family:Georgia,"Times New Roman",serif;display:block;line-height:1.2}
.stat-card span{font-size:12px;opacity:.9;letter-spacing:1px}
.stat-card::after{content:"";position:absolute;right:-20px;top:-20px;width:80px;height:80px;border-radius:50%;background:rgba(255,255,255,.18)}
.stat-card.blue{background:linear-gradient(135deg,#01aaed,#0a8ad4)}
.stat-card.green{background:linear-gradient(135deg,#16baaa,#0f9a8d)}
.stat-card.orange{background:linear-gradient(135deg,#ffb800,#f2882a)}
.stat-card.purple{background:linear-gradient(135deg,#9d7bff,#7a52d4)}

/* ===== 表格辅助 ===== */
.badge{display:inline-block;padding:1px 9px;border-radius:999px;font-size:12px;background:#eef2ff;color:#16b777}
.badge.gray{background:#f1f3f8;color:#8a93a6}
.actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.form-row{display:flex;gap:12px;margin-bottom:14px}
.form-row input[type=text]{flex:1}
.form-row select{width:160px;flex:none}
@media(max-width:768px){
  .form-row{flex-direction:column}
  .form-row select{width:100%}
  .admin-content{padding:12px}
}

/* ===== Markdown 编辑器 ===== */
.editor-toolbar{
  display:flex;gap:4px;flex-wrap:wrap;align-items:center;
  background:#f7f8fa;border:1px solid #e8eaef;border-bottom:none;
  border-radius:6px 6px 0 0;padding:8px 10px;
}
.tb{
  border:none;background:transparent;border-radius:4px;
  padding:5px 11px;font-size:12.5px;color:#4a5266;cursor:pointer;font-family:inherit;
  transition:all .12s;
}
.tb:hover{background:#e8f4ff;color:#16b777}
.editor-wrap{
  display:flex;border:1px solid #e8eaef;border-radius:0 0 6px 6px;background:#fff;overflow:hidden;
}
#editor{
  flex:1;min-width:0;min-height:480px;
  border:none;border-right:1px solid #e8eaef;border-radius:0;
  padding:16px;font-size:14px;line-height:1.85;resize:vertical;
  font-family:Consolas,"Microsoft YaHei",monospace;outline:none;background:#fff;
  box-shadow:none;
}
.editor-preview{
  flex:1;min-width:0;padding:16px 18px;overflow:auto;max-height:620px;
  background:#fbfcfd;font-size:14px;line-height:1.9;color:#333a45;
}
.editor-preview:empty::after{content:"预览区：左侧输入的内容会实时渲染在这里";color:#b3bac6;font-size:13px}
.editor-preview h1,.editor-preview h2,.editor-preview h3,.editor-preview h4{margin:14px 0 8px;line-height:1.5}
.editor-preview h1{font-size:20px}.editor-preview h2{font-size:18px}.editor-preview h3{font-size:16px}
.editor-preview img{max-width:100%;border-radius:4px}
.editor-preview pre{background:#2f3542;color:#e8ecf3;padding:13px 15px;border-radius:6px;overflow:auto;font-size:13px;line-height:1.7;margin:8px 0}
.editor-preview code{background:#eef1f6;padding:1px 5px;border-radius:3px;font-size:13px}
.editor-preview pre code{background:none;padding:0}
.editor-preview blockquote{border-left:3px solid #d5dbe4;margin:8px 0;padding:2px 12px;color:#6a7486}
.editor-preview ul,.editor-preview ol{padding-left:22px;margin:6px 0}
.editor-preview a{color:#16b777}
.editor-preview hr{border:none;border-top:1px solid #e8eaef;margin:12px 0}
.editor-hint{font-size:12px;color:#98a1b3;margin-top:10px;line-height:1.9}
.editor-hint code{background:#eef1f6;padding:1px 5px;border-radius:3px}
@media(max-width:768px){
  .editor-wrap{flex-direction:column}
  #editor{border-right:none;border-bottom:1px solid #e8eaef;min-height:280px}
  .editor-preview{min-height:160px;max-height:400px}
}

/* ===== 登录页 ===== */
.login-body{background:linear-gradient(135deg,#01aaed,#16baaa)}
.login-panel{width:380px;max-width:92%;margin:12vh auto 0;background:#fff;border-radius:10px;padding:36px 32px 28px;box-shadow:0 16px 40px rgba(0,40,80,.22)}
.login-title{text-align:center;font-size:20px;margin-bottom:24px}
.login-back{text-align:center;margin-top:16px;font-size:13px}
.login-back a{color:#8a93a6}
.login-back a:hover{color:#16b777}
