/* 华大农业基因检测后台 - 主题样式 (医疗蓝 + 生态绿，FastAdmin 风格) */
:root {
    --primary: #2c8de4;
    --primary-dark: #1f6fc0;
    --accent: #38b48b;
    --sidebar-bg: #2b333e;
    --sidebar-bg-dark: #232a33;
    --sidebar-hover: #1f262e;
    --sidebar-text: #b8c2cc;
    --topbar-h: 52px;
    --sidebar-w: 224px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #f1f3f6;
    color: #4a4a4a;
    font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== 布局 ===== */
.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: var(--sidebar-bg); overflow-y: auto; z-index: 1000;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #475160; border-radius: 3px; }
.admin-logo {
    height: var(--topbar-h); line-height: var(--topbar-h); color: #fff;
    background: var(--sidebar-bg-dark); font-size: 16px; font-weight: 600;
    padding-left: 18px; white-space: nowrap; overflow: hidden;
}
.admin-logo i { color: var(--accent); margin-right: 8px; }

.admin-main { margin-left: var(--sidebar-w); min-height: 100%; }
.admin-topbar {
    height: var(--topbar-h); background: #fff; border-bottom: 1px solid #e6e9ee;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; position: sticky; top: 0; z-index: 900;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.admin-breadcrumb { font-size: 14px; color: #6b7785; }
.admin-breadcrumb b { color: #2b333e; }
.admin-userbox { display: flex; align-items: center; gap: 14px; }
.admin-userbox .avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    color: #fff; text-align: center; line-height: 32px; font-weight: 600;
}
.admin-content { padding: 18px; }

/* ===== 菜单 ===== */
.admin-menu { list-style: none; margin: 0; padding: 8px 0; }
.admin-menu .menu-group > .group-title {
    display: flex; align-items: center; padding: 11px 18px; color: var(--sidebar-text);
    cursor: pointer; font-size: 14px; user-select: none; transition: background .15s;
}
.admin-menu .menu-group > .group-title:hover { background: var(--sidebar-hover); color: #fff; }
.admin-menu .menu-group > .group-title i.icon { width: 20px; margin-right: 8px; text-align: center; }
.admin-menu .menu-group > .group-title .arrow { margin-left: auto; transition: transform .2s; font-size: 12px; }
.admin-menu .menu-group.open > .group-title .arrow { transform: rotate(90deg); }
.admin-menu .submenu { list-style: none; margin: 0; padding: 0; background: var(--sidebar-bg-dark); display: none; }
.admin-menu .menu-group.open > .submenu { display: block; }
.admin-menu .submenu li a {
    display: flex; align-items: center; padding: 10px 18px 10px 46px; color: var(--sidebar-text);
    font-size: 13px; transition: all .15s; border-left: 3px solid transparent;
}
.admin-menu .submenu li a:hover { color: #fff; background: var(--sidebar-hover); }
.admin-menu .submenu li a i { margin-right: 8px; font-size: 13px; width: 16px; text-align: center; }
.admin-menu .submenu li.active a { color: #fff; background: var(--sidebar-hover); border-left-color: var(--primary); }
.admin-menu a, .admin-menu a:hover, .admin-menu a:focus { text-decoration: none; }

/* ===== 卡片/面板 ===== */
.panel { border: none; border-radius: 6px; box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 18px; }
.panel-heading { border-radius: 6px 6px 0 0 !important; background: #fff; border-bottom: 1px solid #eef1f5; font-weight: 600; color: #2b333e; }
.page-toolbar { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.page-toolbar .toolbar-left { display: flex; gap: 8px; align-items: center; }
.page-toolbar .toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.page-toolbar .form-control { display: inline-block; width: auto; }

/* ===== 统计卡片 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 8px; padding: 18px 20px; display: flex; align-items: center; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.stat-card .ico { width: 52px; height: 52px; border-radius: 10px; color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; margin-right: 16px; }
.stat-card .meta .num { font-size: 26px; font-weight: 700; color: #2b333e; line-height: 1.1; }
.stat-card .meta .label { color: #97a1ad; font-size: 13px; margin-top: 4px; }
.bg-blue { background: linear-gradient(135deg, #2c8de4, #1f6fc0); }
.bg-green { background: linear-gradient(135deg, #38b48b, #2a9173); }
.bg-orange { background: linear-gradient(135deg, #f0a020, #d8861a); }
.bg-red { background: linear-gradient(135deg, #ec5b56, #d8443f); }
.bg-purple { background: linear-gradient(135deg, #8b6fd4, #6f53c0); }
.bg-cyan { background: linear-gradient(135deg, #20b8c4, #1a96a0); }

/* ===== 简易图表(CSS) ===== */
.chart-card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.chart-title { font-weight: 600; color: #2b333e; margin-bottom: 16px; }
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar-chart .bar { width: 60%; max-width: 42px; background: linear-gradient(180deg, #56a8ec, #2c8de4); border-radius: 4px 4px 0 0; position: relative; transition: height .6s; }
.bar-chart .bar .val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #6b7785; white-space: nowrap; }
.bar-chart .bar-label { margin-top: 8px; font-size: 12px; color: #97a1ad; }
.legend-list { list-style: none; margin: 0; padding: 0; }
.legend-list li { display: flex; align-items: center; padding: 7px 0; font-size: 13px; }
.legend-list li .dot { width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; }
.legend-list li .lg-name { color: #4a4a4a; }
.legend-list li .lg-val { margin-left: auto; font-weight: 600; color: #2b333e; }

/* ===== 表格 ===== */
.fixed-table-toolbar .columns { margin-top: 0; }
.bootstrap-table .table { margin-bottom: 0; }
.bootstrap-table tbody input[name="btSelectItem"] { cursor: pointer; }
body.admin-drag-checking,
body.admin-drag-checking .bootstrap-table {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.table > thead > tr > th { background: #f7f9fb; border-bottom: 2px solid #eef1f5; color: #6b7785; font-weight: 600; }
.label-status { padding: 3px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.btn-xs.btn-detail { margin-right: 4px; }
.fixed-table-pagination {
    padding: 8px 0 2px;
}
.fixed-table-pagination .pagination-detail,
.fixed-table-pagination div.pagination {
    margin-top: 6px;
    margin-bottom: 6px;
}
.fixed-table-pagination .pagination-info,
.fixed-table-pagination .page-list {
    color: #6b7785;
    font-size: 13px;
}
.fixed-table-pagination .page-list .btn-group {
    margin: 0 6px;
}
.fixed-table-pagination .page-list .btn {
    min-width: 58px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    color: #2b333e;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: all .15s ease;
}
.fixed-table-pagination .page-list .btn:hover,
.fixed-table-pagination .page-list .btn:focus,
.fixed-table-pagination .page-list.open .btn {
    border-color: #b9c9da;
    background: #f8fbff;
    color: #1f6fc0;
    outline: none;
}
.fixed-table-pagination .page-list .caret {
    margin-left: 8px;
    border-top-color: #7d8a97;
}
.fixed-table-pagination .page-list .dropdown-menu {
    min-width: 86px;
    padding: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}
.fixed-table-pagination .page-list .dropdown-menu > li > a {
    padding: 7px 12px;
    border-radius: 6px;
    color: #4a4a4a;
}
.fixed-table-pagination .page-list .dropdown-menu > li > a:hover,
.fixed-table-pagination .page-list .dropdown-menu > li.active > a,
.fixed-table-pagination .page-list .dropdown-menu > li.active > a:hover {
    background: #eef5ff;
    color: #1f6fc0;
}

/* ===== 登录页 ===== */
.login-wrap {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(150, 195, 239, .22) 0, rgba(150, 195, 239, 0) 18%),
        radial-gradient(circle at 82% 24%, rgba(186, 219, 243, .18) 0, rgba(186, 219, 243, 0) 20%),
        linear-gradient(135deg, #f4f7fb 0%, #edf3f7 46%, #f3f6f8 100%);
}
.login-wrap:before,
.login-wrap:after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.login-wrap:before {
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .54) 0, rgba(255, 255, 255, 0) 28%);
    opacity: .85;
}
.login-wrap:after {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(205, 220, 233, .12) 0, rgba(205, 220, 233, 0) 12%, rgba(205, 220, 233, 0) 88%, rgba(205, 220, 233, .12) 100%);
    opacity: 1;
}
.login-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-stage:before,
.login-stage:after,
.login-wrap .login-cross,
.login-wrap .login-cross:before,
.login-wrap .login-cross:after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 4px;
    background: rgba(217, 225, 233, .28);
}
.login-wrap .login-cross {
    z-index: 0;
}
.login-wrap .login-cross:before,
.login-wrap .login-cross:after {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.login-wrap .login-cross:before {
    width: 24px;
    height: 120px;
}
.login-wrap .login-cross:after {
    width: 120px;
    height: 24px;
}
.login-stage:before {
    left: -300px;
    top: -120px;
    width: 120px;
    height: 24px;
    background: rgba(217, 225, 233, .22);
    box-shadow: 48px 48px 0 0 rgba(217, 225, 233, .22);
}
.login-stage:after {
    right: -300px;
    top: -120px;
    width: 24px;
    height: 120px;
    background: rgba(217, 225, 233, .22);
    box-shadow: -48px 48px 0 0 rgba(217, 225, 233, .22);
}
.login-wrap .login-cross.top-left {
    left: 48px;
    top: 36px;
}
.login-wrap .login-cross.top-right {
    right: 48px;
    top: 36px;
}
.login-wrap .login-cross.bottom-left {
    left: 48px;
    bottom: 96px;
}
.login-wrap .login-cross.bottom-right {
    right: 48px;
    bottom: 96px;
}
.login-card {
    width: 360px;
    background: rgba(255,255,255,.94);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(160, 180, 198, .16);
    padding: 46px 42px 40px;
}
.login-brand {
    margin-bottom: 34px;
}
.login-card .login-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 700;
    color: #1d2b44;
    letter-spacing: .5px;
    white-space: nowrap;
}
.login-card .login-title i {
    color: #45c494;
    font-size: 30px;
}
.login-card .login-sub {
    text-align: center;
    color: #7a8aa5;
    font-size: 11px;
    letter-spacing: 1.2px;
    font-weight: 600;
    margin-bottom: 0;
    white-space: nowrap;
}
.login-card .form-group { margin-bottom: 18px; }
.login-card .input-icon { position: relative; }
.login-card .input-icon i {
    position: absolute;
    left: 18px;
    top: 14px;
    color: #94a3b8;
    font-size: 15px;
}
.login-card .input-icon .form-control {
    height: 32px;
    padding-left: 42px;
    border-radius: 13px;
    border: 1px solid #d8e0eb;
    background: rgba(248, 250, 252, .78);
    box-shadow: none;
    color: #334155;
}
.login-card .input-icon .form-control::placeholder {
    color: #a3afc2;
}
.login-card .btn-login {
    width: 100%;
    height: 54px;
    margin-top: 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    border-radius: 14px;
    background: linear-gradient(180deg, #3875f2 0%, #2f67e4 100%);
    border: none;
    box-shadow: 0 10px 20px rgba(55, 108, 235, .24);
}
.login-card .btn-login:hover,
.login-card .btn-login:focus {
    background: linear-gradient(180deg, #3f7bf5 0%, #356eea 100%);
}
.login-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    color: #96a3b6;
    font-size: 13px;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin: 0;
    cursor: pointer;
}
.login-remember input {
    margin: 0;
}
.login-forgot,
.login-forgot:hover,
.login-forgot:focus {
    color: #9aa8bc;
    text-decoration: none;
}
.login-footer {
    text-align: center;
    color: #8b9ab0;
    margin-top: clamp(110px, 16vh, 180px);
    font-size: 14px;
}

#toast-container {
    z-index: 2147483647 !important;
    pointer-events: none;
}

#toast-container > .toast {
    pointer-events: auto;
}

/* ===== 表单 ===== */
.form-horizontal .control-label { text-align: right; color: #6b7785; font-weight: 500; }
.admin-form-dialog { padding: 20px 24px; }
.required:after { content: " *"; color: #ec5b56; }
.detail-table th { width: 140px; color: #6b7785; background: #f7f9fb; }
.help-block-tip { color: #97a1ad; font-size: 12px; }
.admin-richtext {
    border: 1px solid #d8dde6;
    border-radius: 4px;
    background: #fff;
}
.admin-richtext__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px 8px;
    border-bottom: 1px solid #e8ecf2;
    background: #f8fafc;
}
.admin-richtext__toolbar button {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid #d8dde6;
    border-radius: 4px;
    background: #fff;
    color: #3e4a5a;
    line-height: 28px;
}
.admin-richtext__toolbar button:hover {
    border-color: #2c8de4;
    color: #2c8de4;
}
.admin-richtext__editor {
    min-height: 240px;
    max-height: 520px;
    padding: 12px 14px;
    overflow: auto;
    line-height: 1.75;
    outline: none;
}
.admin-richtext__editor:empty:before {
    content: attr(data-placeholder);
    color: #b2bccb;
}
.admin-richtext__editor img {
    max-width: 100%;
    height: auto;
}
.admin-search-select { position: relative; }
.admin-search-select__dropdown { position: relative; }
.admin-search-select__input {
    height: 38px;
    padding-right: 34px;
}
.admin-search-select__arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #97a1ad;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.admin-search-select__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(27, 45, 72, 0.12);
}
.admin-search-select__list {
    padding: 6px 0;
}
.admin-search-select__item,
.admin-search-select__empty {
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.5;
}
.admin-search-select__item {
    cursor: pointer;
    color: #2b333e;
}
.admin-search-select__item:hover,
.admin-search-select__item.active {
    background: #f5f8fc;
    color: #1f6fd6;
}
.admin-search-select__empty {
    color: #97a1ad;
}
.admin-search-select__source {
    display: none !important;
}
