/* 童言心理重构版后台 · 布局与主题 */
:root {
  --ty-primary: #4f46e5;
  --ty-sidebar: #1e2235;
  --ty-sidebar-text: #a3a8bd;
  --ty-bg: #f3f4f8;
  --ty-radius: 10px;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--ty-bg);
  color: #26292f;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #7c6ff0 55%, #a5b4fc 100%);
  padding: 20px;
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 34px 30px;
  box-shadow: 0 18px 50px rgba(30, 34, 60, .28);
}
.login-logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 6px; }
.login-logo .drop {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  background: #4f46e5; transform: rotate(45deg); position: relative;
}
.login-logo .drop::after {
  content: ''; position: absolute; inset: 8px 12px 12px 8px;
  border-radius: 50%; background: #fff;
}
.login-title { text-align: center; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.login-sub { text-align: center; color: #9aa0ae; font-size: 12px; margin-bottom: 24px; }
.login-tip {
  margin-top: 16px; font-size: 12px; color: #9aa0ae; text-align: center; line-height: 1.7;
}

/* ---------- 主布局 ---------- */
.layout { display: flex; height: 100%; }
.sidebar {
  width: 208px; flex: none; background: var(--ty-sidebar);
  display: flex; flex-direction: column; transition: margin-left .2s;
}
.sidebar.hidden { margin-left: -208px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 600; padding: 18px 18px 14px; font-size: 15px;
}
.brand .drop {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0;
  background: #6d67e8; transform: rotate(45deg); position: relative; flex: none;
}
.brand .drop::after {
  content: ''; position: absolute; inset: 6px 9px 9px 6px; border-radius: 50%; background: #fff;
}
.sidebar .menu { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  color: var(--ty-sidebar-text); text-decoration: none;
  padding: 10px 12px; border-radius: 8px; margin-top: 2px; font-size: 13.5px;
}
.menu-item .ico { width: 18px; text-align: center; flex: none; }
.menu-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-item.active { color: #fff; background: var(--ty-primary); }
.menu-group-title {
  color: #5d6275; font-size: 11px; padding: 14px 12px 4px; letter-spacing: 1px;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; display: flex; align-items: center;
  padding: 0 18px; gap: 12px; box-shadow: 0 1px 4px rgba(20,24,50,.06); z-index: 5;
}
.topbar .page-title { font-size: 15px; font-weight: 600; flex: 1; }
.hamburger {
  display: none; border: none; background: none; font-size: 19px; cursor: pointer; color: #444;
}
.content { flex: 1; overflow: auto; padding: 18px; }
.card {
  background: #fff; border-radius: var(--ty-radius); padding: 18px;
  box-shadow: 0 1px 4px rgba(20,24,50,.05); margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar .grow { flex: 1; }
.muted { color: #9aa0ae; }
.small { font-size: 12px; }
.pager { display: flex; justify-content: flex-end; margin-top: 14px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: var(--ty-radius); padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(20,24,50,.05);
}
.stat-card .num { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat-card .label { color: #9aa0ae; font-size: 12px; }
.chart-box { width: 100%; height: 300px; }
.form-section { border-top: 1px solid #eef0f4; margin-top: 18px; padding-top: 14px; }
.form-section > .section-title { font-weight: 600; font-size: 13.5px; margin-bottom: 12px; }
.readonly-richtext { border: 1px solid #e4e7ed; border-radius: 6px; padding: 10px 14px; max-height: 260px; overflow: auto; background: #fafafa; }

/* 移动端运营视图 */
.mobile-toggle { display: none; }
@media (max-width: 768px) {
  .hamburger { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    box-shadow: 8px 0 30px rgba(10,14,40,.25);
  }
  .sidebar.hidden { margin-left: 0; transform: translateX(-100%); }
  .sidebar-mask {
    position: fixed; inset: 0; background: rgba(15,18,35,.45); z-index: 55;
  }
  .content { padding: 12px; }
  .card { padding: 14px; }
  .topbar { padding: 0 12px; }
  .login-card { width: 100%; max-width: 380px; }
}

/* ===== 移动运营台(R-084) ===== */
[data-page="m-mobile"], [data-page="m-quick"] { padding-bottom: 40px; }
.m-hero { padding: 22px 20px 14px; background: linear-gradient(135deg, var(--el-color-primary-light-9), #fff 70%); }
.m-hero-title { font-size: 20px; font-weight: 700; }
.m-hero-sub { color: var(--el-text-color-secondary); font-size: 12px; margin: 4px 0 14px; }
.m-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-stat { text-align: center; background: #fff; border-radius: 10px; padding: 10px 4px; box-shadow: 0 1px 4px rgba(14,18,27,.05); }
.m-num { font-size: 22px; font-weight: 700; color: var(--el-color-primary); }
.m-num.warn { color: var(--el-color-warning); }
.m-label { font-size: 11px; color: var(--el-text-color-secondary); }
.m-todo { margin-top: 12px; padding: 16px; }
.m-sec-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.m-feedback { border-top: 1px solid var(--el-border-color-lighter); padding: 12px 0 6px; }
.m-feedback-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.m-feedback-body { font-size: 14px; margin: 8px 0; }
.m-feedback-foot { display: flex; align-items: center; justify-content: space-between; }
.m-exp-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--el-border-color-lighter); cursor: pointer; }
.m-exp-date { margin-left: auto; color: var(--el-color-warning); font-size: 12px; }
.m-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.m-action {
  display: flex; flex-direction: column; gap: 2px; padding: 14px;
  border: 1px solid var(--el-border-color-lighter); border-radius: 12px; cursor: pointer;
}
.m-action:active { background: var(--el-fill-color-light); }
.m-action-icon { font-size: 20px; color: var(--el-color-primary); }
.m-action-sub { font-size: 11px; color: var(--el-text-color-secondary); }
.m-searchbar { display: flex; gap: 8px; padding: 12px; margin-bottom: 12px; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-top: 1px solid var(--el-border-color-lighter); }
.m-row:first-of-type { border-top: none; }
.m-row-main { flex: 1; min-width: 0; cursor: pointer; }
.m-row-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
@media (max-width: 768px) {
  .m-grid4 { grid-template-columns: repeat(2, 1fr); }
  .m-searchbar { flex-wrap: wrap; }
}
