/* go-admin 通用后台样式（海蓝色主题 #0096c7） */
:root {
  --brand: #0096c7;
  --brand-dark: #0077a3;
  --sidebar-bg: #ffffff;
  --page-bg: #f2f5f9;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body { background: var(--page-bg); font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }

/* ================= 登录页 ================= */
.login-page {
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0f4fb 0%, #f7fbfd 45%, #d8ecf5 100%);
  position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(0, 150, 199, .08);
}
.login-page::before { width: 480px; height: 480px; top: -160px; left: -120px; }
.login-page::after  { width: 620px; height: 620px; bottom: -260px; right: -180px; }
.login-card {
  width: 380px; padding: 42px 38px 34px; background: #fff; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 90, 130, .12); position: relative; z-index: 2;
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo i { font-size: 44px; color: var(--brand); }
.login-logo h1 { margin: 10px 0 0; font-size: 22px; color: #123; letter-spacing: 2px; }
.login-logo p { margin: 6px 0 0; font-size: 12px; color: #8aa; }
.login-btn { width: 100%; background: var(--brand); }
.login-btn:hover { background: var(--brand-dark) !important; }
.login-tip { text-align: center; color: #9ab; font-size: 12px; margin-top: 18px; }

/* ================= 主框架 ================= */
.layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 220px; background: var(--sidebar-bg); display: flex; flex-direction: column;
  border-right: 1px solid #e6ecf1; flex-shrink: 0;
}
.sidebar .brand {
  height: 56px; display: flex; align-items: center; padding: 0 18px;
  color: var(--brand); font-size: 17px; font-weight: 600; letter-spacing: 1px;
  border-bottom: 1px solid #eef2f6;
}
.sidebar .brand i { font-size: 22px; margin-right: 8px; }
.sidebar-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: #d4dde4; border-radius: 2px; }

.menu-item {
  display: flex; align-items: center; padding: 0 20px; height: 44px; cursor: pointer;
  color: #46607a; font-size: 14px; user-select: none; border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.menu-item i { font-size: 16px; margin-right: 10px; width: 20px; }
.menu-item:hover { background: #f0f8fc; color: var(--brand); }
.menu-item.active { background: #e8f6fc; color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.menu-group-title {
  display: flex; align-items: center; padding: 0 20px; height: 42px; cursor: pointer;
  color: #647a8f; font-size: 13px; user-select: none;
}
.menu-group-title i { font-size: 16px; margin-right: 10px; width: 20px; }
.menu-group-title .arrow { margin-left: auto; transition: transform .2s; font-size: 12px; }
.menu-group-title.open .arrow { transform: rotate(90deg); }
.menu-sub { display: none; }
.menu-sub .menu-item { padding-left: 50px; height: 40px; font-size: 13px; }

.main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.header {
  height: 56px; background: #fff; border-bottom: 1px solid #e6ecf1;
  display: flex; align-items: center; padding: 0 22px; flex-shrink: 0;
}
.header .page-title { font-size: 15px; color: #33475b; font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.header-right .user-chip {
  display: flex; align-items: center; cursor: pointer; padding: 6px 12px; border-radius: 8px;
  color: #46607a; font-size: 13px;
}
.header-right .user-chip:hover { background: #f0f8fc; }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; margin-right: 8px;
}
.user-chip .role-tag { font-size: 11px; color: var(--brand); background: #e8f6fc; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

.content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tab-bar {
  height: 40px; background: #fff; display: flex; align-items: flex-end;
  padding: 0 14px; gap: 4px; border-bottom: 1px solid #e6ecf1; overflow-x: auto; flex-shrink: 0;
}
.tab-item {
  padding: 0 16px; height: 34px; line-height: 34px; font-size: 13px; color: #5a7288;
  background: #f4f7fa; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.tab-item.active { background: var(--page-bg); color: var(--brand); font-weight: 600; }
.tab-item .close { font-size: 12px; color: #a5b6c5; padding: 2px; border-radius: 3px; }
.tab-item .close:hover { background: #dde6ee; color: #678; }
.tab-frames { flex: 1; position: relative; background: var(--page-bg); }
.tab-frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: none; }
.tab-frames iframe.active { display: block; }

/* ================= 页面内容区 ================= */
.page-wrap { padding: 16px; }
.panel {
  background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(30, 80, 120, .06);
  padding: 16px;
}
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .layui-btn { margin: 0; }
.btn-brand { background: var(--brand) !important; }
.btn-brand:hover { background: var(--brand-dark) !important; }

.layui-laypage .layui-laypage-curr .layui-laypage-em { background: var(--brand); }
.layui-form-checked[lay-skin="primary"] i { background: var(--brand) !important; border-color: var(--brand) !important; }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: var(--brand) !important; }
.layui-tab-bar { display: none; }

/* 仪表盘 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(30,80,120,.06); display: flex; align-items: center; }
.stat-card .ico { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-right: 14px; }
.stat-card .num { font-size: 24px; font-weight: 700; color: #223a52; line-height: 1.2; }
.stat-card .lbl { font-size: 12px; color: #8aa0b4; }
