/* OneBot ERP - Layout (sidebar + topbar + tabs)
   Cleaned: removed duplicate vars & rules, kept final sidebar width + density
   ✅ Adjusted (per your actual file):
   - 左侧菜单不换行（超出省略号），不变大
   - 顶部用户/退出那一行更窄（高度+左右 padding 收紧）
   - 内容区整体往上抬一点（content padding 更紧凑）
*/

:root{
  --brand: #2f7cf6;
  --bg: #f3f5f7;

  /* sidebar */
  --sidebar-w: 140px;            /* final: compact */
  --sidebar-bg: #2f3340;
  --sidebar-bg2: #252a36;
  --sidebar-text: rgba(255,255,255,.88);
  --sidebar-muted: rgba(255,255,255,.55);
  --sidebar-active: rgba(47,124,246,.25);

  /* topbar/tabs */
  --topbar-h: 38px;              /* ✅ 原 56 -> 更窄 */
  --tabs-h: 35px;                /* ✅ 原 42 -> 微收 */

  --border: #e7ebf2;
}

html, body{
  height: 100%;
  background: var(--bg);
}

body{
  overflow: hidden; /* page scroll inside .ob-content */
}

/* ================= Topbar ================= */
.ob-topbar{
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;              /* ✅ 原 14 -> 更窄 */
}

.ob-topbar-left{
  display:flex;
  align-items:center;
  gap: 10px;                    /* ✅ 原 12 -> 稍紧 */
}

.ob-iconbtn{
  width: 32px;                  /* ✅ 原 36 -> 更紧凑 */
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.ob-breadcrumb{ font-size: 13px; }
.ob-breadcrumb .muted{ color:#8a94a6; }

.ob-topbar-right{
  display:flex;
  align-items:center;
  gap: 8px;                     /* ✅ 原 10 -> 更紧 */
}

.ob-user{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 4px 8px;             /* ✅ 原 6 10 -> 更窄 */
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.ob-user .name{ font-weight: 700; color:#2b3445; }

.ob-logout{
  text-decoration:none;
  color:#2b3445;
  font-weight:700;
  padding: 6px 8px;             /* ✅ 原 8 10 -> 更窄 */
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
}
.ob-logout:hover{ background:#f6f8fb; }

/* ================= Layout ================= */
.ob-layout{
  height: calc(100vh - var(--topbar-h));
  display:flex;
}

/* ================= Sidebar ================= */
.ob-sidebar{
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255,255,255,.06);
  overflow:auto;
}

/* Brand */
.ob-brand{
  padding: 10px 10px 8px;       /* ✅ 原 14 12 10 -> 更紧 */
  background: var(--sidebar-bg2);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ob-brand .logo{
  color: #fff;
  font-weight: 900;
  font-size: 15px;              /* ✅ 原 16 -> 避免视觉变大 */
}
.ob-brand .sub{
  color: var(--sidebar-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* Menu */
.ob-menu{ padding: 8px; }


.ob-sidebar i{ display: none !important; }
.ob-sidebar i.ob-arrow{ display: inline-block !important; }
/* arrow align */
.ob-sidebar .ob-group-toggle{
  justify-content: space-between;
}
.ob-sidebar i.ob-arrow{
  font-size: 12px;
  opacity: .7;
  margin-left: 6px;
}
.ob-sidebar .ob-menu-group.open > .ob-group-toggle i.ob-arrow{
  transform: rotate(180deg);
  transition: transform .15s ease;
  opacity: .9;
}


.ob-sidebar .ob-link{
  display:flex;
  align-items:center;
  width: 100%;
  box-sizing: border-box;

  padding: 6px 10px;            /* ✅ 原 6 12 -> 横向更省空间 */
  border-radius: 10px;

  color: var(--sidebar-text);
  text-decoration:none;

  font-size: 14px;              /* ✅ 保持不变：不要变大 */
  font-weight: 500;

  /* ✅ 关键：不换行 + 省略号 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ✅ span 也要不换行，否则会断行 */
.ob-sidebar .ob-link span{
  display:block;
  line-height: 1.15;            /* ✅ 原 1.3 -> 更紧，避免撑高 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-sidebar .ob-link:hover{
  background: rgba(255,255,255,.07);
  color:#fff;
}

.ob-sidebar .ob-link.active{
  background: rgba(47,124,246,.22);
  border: 1px solid rgba(47,124,246,.35);
  box-shadow: inset 3px 0 0 var(--brand);
  color:#fff;
}

/* prevent visited color changes */
.ob-sidebar .ob-link,
.ob-sidebar .ob-link:visited,
.ob-sidebar .ob-link:hover,
.ob-sidebar .ob-link:active,
.ob-sidebar .ob-link:focus{
  color: var(--sidebar-text) !important;
  text-decoration: none !important;
  outline: none !important;
}

/* Submenu */
.ob-submenu{
  padding-left: 10px;
  margin-top: 4px;
}
.ob-submenu .ob-sub-link{
  padding: 5px 10px;            /* ✅ 原 5 12 -> 更省空间 */
  font-weight: 450;
  font-size: 13px;
  line-height: 1.15;
  opacity: .95;

  /* ✅ 子菜单也不换行 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-submenu .ob-sub-link:hover{ background: rgba(255,255,255,.1); }
.ob-submenu .ob-sub-link.active{ background: rgba(255,255,255,.16); }

/* keep sidebar always expanded (disable icon-only collapse) */
body.ob-sidebar-collapsed .ob-sidebar{ width: var(--sidebar-w); }
body.ob-sidebar-collapsed .ob-link span{ display: inline; }
body.ob-sidebar-collapsed .ob-brand .sub{ display: block; }

/* ================= Main ================= */
.ob-main{
  flex: 1;
  min-width: 0;
  display:flex;
  flex-direction: column;
}

/* Tabs */
.ob-tabs{
  height: var(--tabs-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 0 8px;
  overflow-x:auto;
  white-space: nowrap;
}

.ob-tab{
  height: 30px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid var(--border);
  background:#fafbfe;
  border-radius: 10px;
  padding: 0 10px;
  cursor:pointer;
}
.ob-tab.active{
  background:#fff;
  border-color:#b9cff6;
}

.ob-tab .t{
  max-width: 160px;
  overflow:hidden;
  text-overflow: ellipsis;
}

.ob-tab .x{
  border:0;
  background:transparent;
  width: 18px;
  height:18px;
  border-radius: 8px;
  color:#7b879a;
  cursor:pointer;
}
.ob-tab .x:hover{
  background:#e9eef8;
  color:#2b3445;
}

/* Content */
.ob-content{
  flex: 1;
  overflow:auto;
  padding: 12px;                /* ✅ 原 16 -> 标题整体往上抬 */
  background: var(--bg);
}

/* Footer - compact */
.ob-footer{
  height: 28px;                 /* 原来 44px → 缩到 28px */
  display:flex;
  align-items:center;
  justify-content:center;

  font-size: 12px;              /* 字号略小 */
  line-height: 1;               /* 避免被撑高 */
  color:#8a94a6;

  background: var(--bg);
  border-top: 1px solid rgba(0,0,0,.04);
}

