/* MITIME ONE 股东驾驶舱 —— 前端样式
   视觉规范：纯白底、深蓝导航、卡片容器、统一色标。 */

:root {
    --nav-bg: #1f2d4d;          /* 顶部/侧边导航深蓝 */
    --nav-bg-light: #27375c;
    --brand: #1f4e79;          /* 主品牌蓝 */
    --data-blue: #409eff;      /* 经营数据蓝 */
    --green: #67c23a;          /* 正常运行 */
    --yellow: #e6a23c;          /* 建设中 */
    --red: #f56c6c;            /* 停机/异常 */
    --text: #303133;
    --muted: #909399;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    background: #f5f7fa;
    color: var(--text);
}

#app { min-height: 100vh; }

/* 登录页 */
.login-wrap {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2d4d 0%, #1f4e79 100%);
}
.login-card {
    width: 360px;
    background: #fff;
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.login-logo { text-align: center; font-size: 22px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.login-logo-img { display: block; width: 220px; max-width: 80%; height: auto; margin: 0 auto 8px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row .el-input { flex: 1; }
.captcha-img { width: 110px; height: 38px; border-radius: 6px; cursor: pointer; border: 1px solid var(--brand-dim); flex-shrink: 0; background: #f4f7fa; object-fit: contain; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13px; }

/* 主框架 */
.layout { display: flex; min-height: 100vh; }
.side {
    width: 210px;
    background: var(--nav-bg);
    color: #fff;
    transition: width 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 收缩时裁掉溢出文字，避免遮挡主内容区 */
    flex-shrink: 0;
}
.side.collapse { width: 64px; }
.side .logo {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    overflow: hidden;
}
.side .logo-mini { display: none; font-size: 20px; color: #d4af37; letter-spacing: 0; }
.side .logo-full-img { height: 34px; max-width: 170px; object-fit: contain; }
.side .logo-mini-img { display: none; height: 32px; width: 32px; object-fit: contain; border-radius: 6px; }
.side.collapse .logo-full { display: none; }
.side.collapse .logo-full-img { display: none; }
.side.collapse .logo-mini { display: inline; }
.side.collapse .logo-mini-img { display: block; margin: 0 auto; }
.side .mi { display: inline-block; width: 20px; text-align: center; margin-right: 10px; font-size: 16px; flex-shrink: 0; }
.side.collapse .mi { margin-right: 0; }
.side .el-menu-item { display: flex; align-items: center; }
.side .el-menu { border-right: none; background: transparent; flex: 1; }
.side .el-menu-item { color: #c7d0e0; }
.side .el-menu-item.is-active { background: var(--brand); color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 16px;
}
.topbar .version { color: var(--muted); font-size: 13px; }
.topbar .collapse-btn { cursor: pointer; font-size: 20px; color: var(--brand); }

/* ---- 用户下拉菜单（参考系统风格）---- */
.user-drop { margin-left: auto; cursor: pointer; }
.user-trigger { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 6px; border: 1px solid #dcdfe6; transition: all .2s; }
.user-trigger:hover { border-color: var(--brand); background: #f0f5ff; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: #1a7a3a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-avatar-icon { width: 18px; height: 18px; fill: #fff; display: block; }
.user-name { font-weight: 600; font-size: 14px; color: #303133; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-arrow { color: #909399; font-size: 12px; }

/* 下拉菜单内部：绿色头像头 */
.user-menu { padding: 0 !important; min-width: 220px; overflow: hidden; }
.user-menu-header { background: linear-gradient(135deg, #1a7a3a, #2d9a52); padding: 18px 16px; display: flex; align-items: center; gap: 12px; color: #fff; }
.um-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.25); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.um-info { flex: 1; min-width: 0; }
.um-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.um-role { font-size: 12px; opacity: 0.85; line-height: 1.3; }

/* 菜单项图标对齐 */
.user-menu .el-dropdown-menu__item { padding: 10px 18px; font-size: 14px; }
.user-menu .el-dropdown-menu__item i { margin-right: 8px; font-style: normal; }

.content { padding: 18px; overflow: auto; flex: 1; }

/* 卡片与栅格 */
.page-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; color: var(--nav-bg); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); border-left: 4px solid var(--data-blue); }
.kpi-card .label { color: var(--muted); font-size: 13px; }
.kpi-card .value { font-size: 24px; font-weight: 700; margin-top: 6px; color: var(--brand); }
.section { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.section h3 { margin: 0 0 12px; font-size: 15px; color: var(--nav-bg); }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.report-toolbar h3 { margin: 0; }
.status-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.status-item { border-radius: 8px; padding: 14px; color: #fff; text-align: center; }
.status-item .num { font-size: 26px; font-weight: 700; }
.status-item .txt { font-size: 13px; opacity: 0.9; }

/* 状态标签 */
.tag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* 响应式：手机端侧栏收起为顶栏抽屉感 */
@media (max-width: 768px) {
    .side { position: fixed; z-index: 30; height: 100%; }
    .side.collapse { width: 0; overflow: hidden; }
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 12px; }
    .topbar { padding: 0 10px; }
}
