/**
 * FishERP 后台样式
 */

:root {
    --fish-header-h: 60px;
    --fish-side-w: 220px;
    --fish-primary: #1e9fff;
    --fish-dark: #2b3a4b;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #f2f3f5;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* ---------------- 布局 ---------------- */
.fish-layout { height: 100%; }

.fish-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--fish-header-h);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.fish-header .fish-logo {
    width: var(--fish-side-w);
    font-size: 18px;
    font-weight: 600;
    color: var(--fish-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fish-header .fish-logo i { font-size: 24px; }

/* index.html 用 <div id="header"> 承载注入片段，它需充当 .fish-header 的 flex 行，
   否则 .fish-header-right 的 margin-left:auto 失效、右侧信息会掉到 logo 下一行。 */
.fish-header #header {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.fish-header .fish-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #5a6474;
    font-size: 14px;
}

.fish-header .fish-user { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.fish-header .fish-user .layui-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--fish-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }

.fish-side {
    position: fixed;
    top: var(--fish-header-h);
    bottom: 0;
    left: 0;
    width: var(--fish-side-w);
    background: #fff;
    border-right: 1px solid #eee;
    overflow: auto;
    z-index: 999;
}

.fish-body {
    position: fixed;
    top: var(--fish-header-h);
    left: var(--fish-side-w);
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: #f2f3f5;
}

.fish-body iframe { width: 100%; height: 100%; border: 0; display: block; }

.fish-footer {
    position: fixed;
    left: var(--fish-side-w);
    right: 0;
    bottom: 0;
    height: 34px;
    line-height: 34px;
    text-align: center;
    color: #99a2b1;
    font-size: 12px;
    background: #fafafa;
    border-top: 1px solid #eee;
    z-index: 998;
}

/* ---------------- 登录页 ---------------- */
.fish-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e9fff 0%, #16b777 100%);
    position: relative;
    overflow: hidden;
}
.fish-login-wrap::before,
.fish-login-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.fish-login-wrap::before { width: 420px; height: 420px; top: -120px; left: -120px; }
.fish-login-wrap::after  { width: 320px; height: 320px; bottom: -100px; right: -80px; }

.fish-login-box {
    position: relative;
    z-index: 2;
    width: 380px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
    padding: 36px 34px 26px;
}

.fish-login-box h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.fish-login-box .fish-sub {
    text-align: center;
    color: #99a2b1;
    font-size: 13px;
    margin-bottom: 26px;
}

.fish-login-box .layui-form-item { margin-bottom: 18px; }
.fish-login-box .layui-input { height: 42px; line-height: 42px; }

.fish-captcha-row { display: flex; gap: 10px; }
.fish-captcha-row .layui-input { flex: 1; }
.fish-captcha-row img {
    height: 42px;
    width: 120px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    cursor: pointer;
    background: #fafafa;
}

.fish-login-btn { width: 100%; height: 42px; font-size: 15px; }

.fish-login-tip {
    margin-top: 14px;
    text-align: center;
    color: #a6aeb8;
    font-size: 12px;
}

/* ---------------- 内容页 ---------------- */
.fish-page { padding: 14px; }

.fish-panel {
    background: #fff;
    border-radius: 4px;
    padding: 14px;
    margin-bottom: 12px;
}

.fish-search-form .layui-form-item { margin-bottom: 0; }

.fish-toolbar { margin-bottom: 10px; }

/* 统计卡片 */
.fish-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fish-card {
    flex: 1;
    min-width: 180px;
    background: #fff;
    border-radius: 4px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.fish-card .fish-card-icon {
    width: 52px; height: 52px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #fff;
}
.fish-card .fish-card-info .fish-card-num { font-size: 24px; font-weight: 600; color: #333; line-height: 1.2; }
.fish-card .fish-card-info .fish-card-label { font-size: 13px; color: #99a2b1; margin-top: 4px; }

.bg-blue { background: #1e9fff; }
.bg-green { background: #16b777; }
.bg-orange { background: #ffb800; }
.bg-red { background: #ff5722; }
.bg-purple { background: #a233c6; }

/* 简易柱状图（无第三方图表库） */
.fish-chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding-top: 10px; }
.fish-chart-item { flex: 1; text-align: center; }
.fish-chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #1e9fff, #7ec5ff);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height .4s;
}
.fish-chart-item .fish-chart-label { font-size: 12px; color: #99a2b1; margin-top: 6px; }
.fish-chart-item .fish-chart-value { font-size: 12px; color: #666; margin-bottom: 4px; }

.fish-empty { text-align: center; color: #a6aeb8; padding: 30px 0; }

/* 表格内文本过长省略 */
.fish-ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
