/* 蜂群计划·总控制台 - 自定义样式 */
:root {
    --hive-primary: #F59E0B;
    --hive-primary-dark: #D97706;
    --hive-primary-light: #FCD34D;
    --hive-sidebar: #1e293b;
    --hive-sidebar-2: #0f172a;
    --hive-sidebar-hover: #334155;
    --hive-sidebar-active: #F59E0B;
    --hive-bg: #f4f5f7;
    --hive-card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --hive-card-shadow-hover: 0 6px 20px rgba(0,0,0,.10), 0 3px 8px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
body {
    background: var(--hive-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    color: #1f2937;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 248px;
    background: linear-gradient(180deg, var(--hive-sidebar) 0%, var(--hive-sidebar-2) 100%);
    color: #cbd5e1;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .28s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
}
.sidebar-brand {
    padding: 18px 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand .logo-box {
    width: 42px; height: 42px;
    flex: 0 0 42px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--hive-primary) 0%, var(--hive-primary-dark) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
.sidebar-brand .brand-text { line-height: 1.2; }
.sidebar-brand .brand-text .title {
    font-size: 15px; font-weight: 700; color: #fff;
    letter-spacing: .5px;
}
.sidebar-brand .brand-text .sub {
    font-size: 11px; color: #94a3b8; margin-top: 2px;
}

.sidebar-nav { padding: 14px 12px; flex: 1 1 auto; overflow-y: auto; }
.sidebar-nav .nav-section {
    font-size: 11px; color: #64748b; text-transform: uppercase;
    letter-spacing: 1px; padding: 14px 12px 6px;
}
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 9px;
    margin-bottom: 3px;
    font-size: 14px;
    transition: all .18s ease;
    position: relative;
}
.sidebar-nav .nav-item i { font-size: 17px; width: 20px; text-align: center; }
.sidebar-nav .nav-item:hover {
    background: var(--hive-sidebar-hover);
    color: #fff;
    transform: translateX(2px);
}
.sidebar-nav .nav-item.active {
    background: linear-gradient(90deg, rgba(245,158,11,.18) 0%, rgba(245,158,11,.04) 100%);
    color: var(--hive-primary-light);
    font-weight: 600;
}
.sidebar-nav .nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0;
    background: var(--hive-primary);
}
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hive-primary), var(--hive-primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px;
    flex: 0 0 34px;
}
.sidebar-footer .meta { flex: 1 1 auto; min-width: 0; }
.sidebar-footer .meta .name { color: #e2e8f0; font-size: 13px; font-weight: 600; }
.sidebar-footer .meta .role { color: #64748b; font-size: 11px; }
.sidebar-footer .logout-btn {
    color: #94a3b8; background: none; border: none; cursor: pointer;
    font-size: 16px; padding: 4px 6px; border-radius: 6px; transition: all .18s;
}
.sidebar-footer .logout-btn:hover { color: #fca5a5; background: rgba(252,165,165,.1); }

/* ===== 主内容区 ===== */
.main-wrap {
    margin-left: 248px;
    min-height: 100vh;
    transition: margin .28s ease;
}
.topbar {
    position: sticky; top: 0; z-index: 1030;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar .topbar-title { font-size: 17px; font-weight: 700; color: #111827; margin: 0; }
.topbar .topbar-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.topbar .topbar-actions { display: flex; align-items: center; gap: 10px; }
.content { padding: 24px; }

/* 移动端遮罩 */
.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 1035; opacity: 0; visibility: hidden;
    transition: opacity .25s ease;
}
.sidebar-backdrop.show { opacity: 1; visibility: visible; }

.menu-toggle {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    width: 38px; height: 38px; cursor: pointer; display: none;
    align-items: center; justify-content: center; color: #374151;
}
.menu-toggle:hover { background: #f3f4f6; }

/* ===== 卡片 ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--hive-card-shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--hive-card-shadow-hover); }
.card.card-table { overflow: hidden; }
.card-header-sm { padding: 14px 18px; background: #fff; border-bottom: 1px solid #f0f0f0; }

/* 统计卡片 */
.stat-card {
    border-radius: 14px;
    border: none;
    overflow: hidden;
    position: relative;
    box-shadow: var(--hive-card-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--hive-card-shadow-hover); }
.stat-card .stat-icon {
    width: 52px; height: 52px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.stat-card .stat-num { font-size: 26px; font-weight: 800; color: #111827; line-height: 1; }
.stat-card .stat-label { font-size: 13px; color: #6b7280; margin-top: 6px; }

/* 状态徽章 */
.badge-status { font-weight: 600; padding: .4em .7em; border-radius: 6px; font-size: 11px; }
.badge-on { background: #dcfce7; color: #15803d; }
.badge-off { background: #fee2e2; color: #b91c1c; }

/* 表格 */
.table { margin: 0; }
.table thead th {
    background: #f9fafb; color: #6b7280; font-weight: 600;
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid #eee; padding: 12px 16px;
}
.table tbody td { padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid #f3f4f6; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #fafbfc; }
.table tbody tr:last-child td { border-bottom: none; }

/* 按钮 */
.btn-hive {
    background: linear-gradient(135deg, var(--hive-primary) 0%, var(--hive-primary-dark) 100%);
    border: none; color: #fff; font-weight: 600;
    box-shadow: 0 2px 8px rgba(245,158,11,.3);
    transition: all .18s ease;
}
.btn-hive:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(245,158,11,.42); color:#fff; }
.btn-hive:active { transform: translateY(0); }
.btn-soft { font-size: 12px; padding: .3rem .6rem; border-radius: 7px; }
.btn-soft-action { background: #eff6ff; color: #2563eb; }
.btn-soft-action:hover { background: #dbeafe; color: #1d4ed8; }
.btn-soft-edit { background: #fef3c7; color: #b45309; }
.btn-soft-edit:hover { background: #fde68a; color: #92400e; }
.btn-soft-danger { background: #fee2e2; color: #dc2626; }
.btn-soft-danger:hover { background: #fecaca; color: #b91c1c; }

/* 表单 */
.form-control, .form-select {
    border-radius: 9px; border: 1px solid #e2e8f0;
    padding: .55rem .8rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--hive-primary);
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.form-label { font-weight: 600; color: #374151; margin-bottom: .4rem; font-size: 14px; }
.form-text { color: #9ca3af; font-size: 12px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #cbd5e1; border-radius: 24px; transition: .25s;
}
.switch .slider::before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--hive-primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 分页 */
.pagination { margin: 18px 0 0; }
.pagination .page-link {
    border: none; color: #6b7280; margin: 0 2px; border-radius: 7px !important;
    padding: .42rem .72rem; transition: all .15s ease;
}
.pagination .page-link:hover { background: #f3f4f6; color: #111827; }
.pagination .active .page-link {
    background: var(--hive-primary); color: #fff;
    box-shadow: 0 2px 6px rgba(245,158,11,.3);
}
.pagination .disabled .page-link { color: #cbd5e1; background: transparent; }

/* 友站 logo 圆 */
.site-favicon {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: inline-flex; align-items: center; justify-content: center;
    color: #b45309; font-weight: 700; font-size: 14px;
    flex: 0 0 32px;
}
.site-favicon img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ===== 后台切换统计条 ===== */
.console-statbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.console-stat-item {
    background: #fff; border-radius: 12px; padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--hive-card-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    border-left: 4px solid var(--hive-primary);
}
.console-stat-item:hover { transform: translateY(-2px); box-shadow: var(--hive-card-shadow-hover); }
.console-stat-item i {
    font-size: 24px; color: var(--hive-primary-dark);
    background: #fef3c7; width: 44px; height: 44px;
    border-radius: 11px; display: flex; align-items: center; justify-content: center;
    flex: 0 0 44px;
}
.console-stat-item .num { font-size: 22px; font-weight: 800; color: #111827; line-height: 1; }
.console-stat-item .num-sm { font-size: 14px; font-weight: 700; color: #111827; line-height: 1.2; max-width: 130px; }
.console-stat-item .label { font-size: 12px; color: #6b7280; margin-top: 3px; }
.console-stat-recent { border-left-color: #2563eb; }
.console-stat-recent i { color: #1d4ed8; background: #dbeafe; }

/* ===== 后台切换卡片 ===== */
.console-card {
    border: none; border-radius: 14px; overflow: hidden;
    box-shadow: var(--hive-card-shadow);
    transition: all .22s ease;
    height: 100%;
    background: #fff;
    border-top: 3px solid var(--hive-primary);
}
.console-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hive-card-shadow-hover);
}
.console-card.console-card-disabled { opacity: .72; border-top-color: #cbd5e1; }
.console-card.console-card-disabled:hover { opacity: 1; }
.console-card .console-head {
    padding: 16px 18px; display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
    border-bottom: 1px solid #fde68a;
}
.console-card .console-icon {
    width: 44px; height: 44px; border-radius: 11px;
    background: linear-gradient(135deg, var(--hive-primary), var(--hive-primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px;
    box-shadow: 0 3px 10px rgba(245,158,11,.3);
    flex: 0 0 44px;
}
.console-card .console-name { font-weight: 700; color: #111827; font-size: 15px; line-height:1.2; }
.console-card .console-url { font-size: 12px; color: #9ca3af; margin-top: 2px; word-break: break-all; }
.console-card .console-body { padding: 12px 18px; }
.console-card .console-meta { font-size: 12px; color: #6b7280; }
.console-card .console-stats {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 11px; color: #94a3b8;
    padding-top: 8px; border-top: 1px dashed #f1f5f9;
}
.console-card .console-stat { display: inline-flex; align-items: center; }
.console-card .console-foot {
    padding: 10px 18px; background: #fafbfc; border-top: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.btn-enter {
    font-weight: 700; font-size: 13px;
    padding: .42rem .9rem; border-radius: 9px;
    box-shadow: 0 2px 8px rgba(245,158,11,.3);
    transition: all .18s ease;
}
.btn-enter:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.45); }

/* 卡片网格响应式 */
.console-grid .col-md-6, .console-grid [class*="col-"] { display: flex; }
.console-grid .console-card { width: 100%; }

/* ===== 图标选择器 ===== */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb; border-radius: 10px;
    max-height: 200px; overflow-y: auto;
}
.icon-pick { cursor: pointer; margin: 0; }
.icon-pick input { display: none; }
.icon-pick-body {
    display: flex; align-items: center; justify-content: center;
    height: 44px; background: #fff; border: 1.5px solid #e5e7eb;
    border-radius: 9px; font-size: 18px; color: #6b7280;
    transition: all .15s ease;
}
.icon-pick:hover .icon-pick-body {
    border-color: var(--hive-primary); color: var(--hive-primary-dark);
    transform: translateY(-2px);
}
.icon-pick input:checked + .icon-pick-body {
    background: linear-gradient(135deg, var(--hive-primary), var(--hive-primary-dark));
    color: #fff; border-color: var(--hive-primary-dark);
    box-shadow: 0 3px 10px rgba(245,158,11,.35);
}

/* 便捷提示条 */
.console-tip {
    margin-top: 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a; border-radius: 10px;
    padding: 12px 16px; display: flex; gap: 10px;
    font-size: 13px; color: #92400e; align-items: flex-start;
}
.console-tip i { font-size: 16px; color: var(--hive-primary-dark); margin-top: 1px; }
.console-tip strong { color: #78350f; }

.home-console-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: var(--hive-card-shadow);
    transition: all .22s ease;
    border-top: 3px solid var(--hive-primary);
    display: flex; flex-direction: column;
}
.home-console-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hive-card-shadow-hover);
}
.home-console-link {
    padding: 14px 14px 8px;
    text-decoration: none;
    display: flex; align-items: center; gap: 10px;
}
.home-console-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--hive-primary), var(--hive-primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    box-shadow: 0 3px 8px rgba(245,158,11,.28);
    flex: 0 0 40px;
}
.home-console-name {
    font-weight: 700; color: #111827; font-size: 14px;
    flex: 1 1 auto; min-width: 0;
}
.home-console-meta {
    padding: 0 14px 10px;
}
.home-console-meta .text-muted { font-size: 11px; }

/* 首页醒目文档卡片 */
.highlight-card {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
}
.highlight-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 50%;
    opacity: 0.15;
}
.highlight-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
.highlight-card .text-muted { color: #9ca3af !important; }
.highlight-card .fw-bold { color: #fff; }
@media (max-width: 576px) {
    .highlight-card .btn span { display: none; }
    .highlight-card .btn i { margin-right: 0 !important; }
}
.home-console-tags {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-top: 6px;
}
.home-console-tags .category-pill {
    font-size: 10px; padding: 2px 7px;
    cursor: pointer; transition: opacity .15s;
}
.home-console-tags .category-pill:hover { opacity: .85; }
.home-console-actions {
    padding: 8px 14px; background: #fafbfc; border-top: 1px solid #f3f4f6;
    display: flex; gap: 6px;
}
.home-console-actions .btn { font-size: 11px; padding: .35rem .6rem; }

/* 仪表盘快捷入口 */
.quick-console-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border-radius: 10px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
    border: 1px solid #fde68a;
    text-decoration: none;
    transition: all .2s ease;
    height: 100%;
}
.quick-console-item > i:first-child {
    font-size: 16px; color: var(--hive-primary-dark);
    background: #fff; width: 28px; height: 28px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 28px;
    box-shadow: 0 1px 3px rgba(245,158,11,.2);
}
.quick-console-item span {
    font-size: 13px; font-weight: 600; color: #92400e;
    flex: 1 1 auto; min-width: 0;
}
.quick-console-item .quick-go {
    font-size: 11px; color: #d97706; opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    flex: 0 0 auto;
}
.quick-console-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    box-shadow: 0 4px 12px rgba(245,158,11,.25);
}
.quick-console-item:hover .quick-go { opacity: 1; transform: translateX(2px); }
.quick-console-item:hover span { color: #78350f; }

.search-box { max-width: 400px; }
.search-box .form-control { font-size: 14px; padding: .55rem .8rem; }

/* 空状态 */
.empty-state {
    text-align: center; padding: 50px 20px; color: #9ca3af;
}
.empty-state i { font-size: 48px; color: #d1d5db; margin-bottom: 12px; display: block; }

/* ===== 登录页 ===== */
.login-page {
    margin: 0; min-height: 100vh;
    background: radial-gradient(ellipse at top, #1e293b 0%, #0f172a 60%, #020617 100%);
    overflow: hidden;
    position: relative;
}

/* 蜂巢背景图案 */
.hive-bg {
    position: absolute; inset: 0; z-index: 0; opacity: 0.5;
    pointer-events: none;
}
.hive-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-repeat: repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0L56 16.18V49.4L28 65.6L0 49.4V16.18L28 0z' fill='none' stroke='rgba(245,158,11,0.10)' stroke-width='1'/%3E%3Cpath d='M28 33.8L56 50V83.2L28 99.4L0 83.2V50L28 33.8z' fill='none' stroke='rgba(245,158,11,0.06)' stroke-width='1'/%3E%3C/svg%3E");
}

/* 背景光晕 */
.login-glow {
    position: absolute; border-radius: 50%; filter: blur(80px);
    pointer-events: none; z-index: 0;
}
.login-glow-1 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(245,158,11,0.35) 0%, transparent 70%);
    top: -140px; right: -120px;
    animation: glowDrift1 14s ease-in-out infinite alternate;
}
.login-glow-2 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(251,191,36,0.28) 0%, transparent 70%);
    bottom: -140px; left: -100px;
    animation: glowDrift2 18s ease-in-out infinite alternate;
}
@keyframes glowDrift1 {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(-40px,30px) scale(1.1); }
}
@keyframes glowDrift2 {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(50px,-30px) scale(1.15); }
}

.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    position: relative; z-index: 2;
}
.login-card {
    width: 100%; max-width: 420px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 22px; padding: 40px 36px 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.3);
    position: relative; z-index: 2;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: cardIn .6s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo {
    width: 70px; height: 70px; margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--hive-primary), var(--hive-primary-dark));
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 28px rgba(245,158,11,.45), 0 0 0 6px rgba(245,158,11,.12);
    position: relative;
}
.login-logo::after {
    content: ''; position: absolute; inset: -2px;
    border-radius: 22px; border: 1px solid rgba(255,255,255,.25);
    pointer-events: none;
}
.login-title { font-size: 22px; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: .3px; }
.login-sub { font-size: 12.5px; color: #94a3b8; margin: 6px 0 0; letter-spacing: .5px; }

/* 浮动标签输入框 */
.login-card .form-floating > .form-control {
    height: calc(3.4rem + 2px);
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    padding: 1.5rem 1rem .55rem;
    transition: border-color .15s, box-shadow .15s;
}
.login-card .form-floating > .form-control:focus {
    border-color: var(--hive-primary);
    box-shadow: 0 0 0 4px rgba(245,158,11,.13);
}
.login-card .form-floating > label {
    padding: 1rem 1rem; color: #94a3b8; font-size: 14px;
    transition: color .15s;
}
.login-card .form-floating > .form-control:focus ~ label,
.login-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--hive-primary-dark);
}

/* 密码框 */
.password-wrap { position: relative; }
.pwd-toggle {
    position: absolute; top: 50%; right: 14px;
    transform: translateY(-50%);
    background: transparent; border: none; padding: 4px;
    color: #94a3b8; cursor: pointer; font-size: 16px;
    z-index: 5; border-radius: 6px; transition: color .15s, background .15s;
}
.pwd-toggle:hover { color: var(--hive-primary-dark); background: rgba(245,158,11,.1); }
.password-wrap .form-control { padding-right: 48px; }

/* 表单开关 */
.login-card .form-switch .form-check-input {
    width: 2.3em; height: 1.25em; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
}
.login-card .form-switch .form-check-input:checked {
    background-color: var(--hive-primary);
    border-color: var(--hive-primary-dark);
}

/* 安全徽章 */
.secure-badge {
    background: rgba(22,163,74,.1); color: #15803d;
    font-weight: 600; padding: .45em .75em; font-size: 11px; border-radius: 6px;
}

/* 登录按钮 */
.btn-login {
    font-size: 15px; font-weight: 700;
    padding: 11px 16px !important;
    border-radius: 12px;
    letter-spacing: 2px;
    box-shadow: 0 6px 18px rgba(245,158,11,.4);
    transition: all .2s ease;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(245,158,11,.55); }
.btn-login:active { transform: translateY(0); }
.btn-loader { display: inline-flex; align-items: center; }

/* 底部信息 */
.login-foot {
    margin-top: 28px; padding-top: 18px;
    border-top: 1px dashed #e5e7eb;
    text-align: center;
}
.login-foot-row {
    font-size: 12px; color: #94a3b8;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-bottom: 6px;
}
.login-foot-meta {
    font-size: 11px; color: #cbd5e1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-foot-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #94a3b8; }

/* Toast */
.toast-container { position: fixed; top: 18px; right: 18px; z-index: 2000; }
.app-toast {
    min-width: 260px; border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.15); margin-bottom: 10px;
    animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.app-toast.fade-out { animation: slideOut .3s ease forwards; }
@keyframes slideOut { to { transform: translateX(110%); opacity: 0; } }

/* 分类胶囊 */
.category-pill {
    display: inline-flex; align-items: center; padding: 3px 10px;
    border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pill-bee_series { background: #fef3c7; color: #92400e; }
.pill-tool { background: #dbeafe; color: #1e40af; }
.pill-resource { background: #d1fae5; color: #065f46; }
.pill-community { background: #ede9fe; color: #5b21b6; }
.pill-other { background: #f3f4f6; color: #4b5563; }

/* ===== 响应式 · 移动端全面优化 ===== */

/* 大屏平板及以下：侧边栏抽屉化 */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.show { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.25); }
    .main-wrap { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .content { padding: 20px; }
}

/* 手机端（含大屏手机） */
@media (max-width: 767.98px) {
    .content { padding: 14px; }
    .topbar {
        padding: 10px 14px;
        flex-wrap: wrap; gap: 8px;
    }
    .topbar-title { font-size: 15px; }
    .topbar-sub { display: none; }
    .topbar-actions .badge-status { display: none; }
    .topbar-actions .btn-soft-action { width: 34px; height: 34px; padding: 0; }

    /* 统计卡片手机两列 */
    .stat-card { padding: 14px !important; }
    .stat-card .stat-icon { width: 42px; height: 42px; font-size: 20px; }
    .stat-card .stat-num { font-size: 22px; }

    /* 后台卡片网格单列 */
    .console-grid [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
    .console-card .console-foot { flex-wrap: wrap; gap: 10px; }
    .console-card .console-foot .btn-enter { flex: 1 1 auto; }
    .console-card .console-foot .btn-group { flex: 0 0 auto; }

    /* 后台切换统计条两列 */
    .console-statbar { grid-template-columns: 1fr 1fr; gap: 10px; }
    .console-stat-item { padding: 12px 13px; }
    .console-stat-item i { width: 38px; height: 38px; font-size: 20px; flex: 0 0 38px; }
    .console-stat-item .num { font-size: 18px; }

    /* 操作栏表单堆叠 */
    .card-body .row.g-2 > [class*="col-md"] { flex: 0 0 100%; max-width: 100%; }
    .card-body .row.g-2 .btn { width: 100%; }

    /* 表单全宽 */
    .row.g-3 > [class*="col-md"] { flex: 0 0 100%; max-width: 100%; }

    /* 分页居中 */
    .pagination { justify-content: center; }
    .pagination .page-link { padding: .5rem .75rem; }

    /* 卡片头部紧凑 */
    .card-header-sm { padding: 12px 14px; }
    .card-body { padding: 16px !important; }

    /* 便捷提示紧凑 */
    .console-tip { font-size: 12px; padding: 10px 12px; }

    /* 表格单元格紧凑 */
    .table thead th { padding: 10px 12px; font-size: 11px; }
    .table tbody td { padding: 10px 12px; }

    /* 登录页手机适配 */
    .login-wrap { padding: 16px; }
    .login-card { padding: 30px 22px 22px; border-radius: 18px; }
    .login-logo { width: 60px; height: 60px; border-radius: 16px; }
    .login-title { font-size: 19px; }
    .login-sub { font-size: 11.5px; }
    .login-card .form-floating > .form-control { height: calc(3.2rem + 2px); }
    .btn-login { font-size: 14px; padding: 10px 14px !important; letter-spacing: 1px; }

    /* 背景光晕缩小避免溢出 */
    .login-glow-1 { width: 300px; height: 300px; }
    .login-glow-2 { width: 260px; height: 260px; }
}

/* 小屏手机 */
@media (max-width: 575.98px) {
    .content { padding: 12px; }
    .topbar { padding: 9px 12px; }
    .topbar-title { font-size: 14px; }
    .menu-toggle { width: 34px; height: 34px; }

    .stat-card { padding: 12px !important; }
    .stat-card .stat-icon { width: 38px; height: 38px; font-size: 18px; }
    .stat-card .stat-num { font-size: 20px; }
    .stat-card .stat-label { font-size: 12px; }

    .console-statbar { grid-template-columns: 1fr 1fr; gap: 8px; }
    .console-stat-item { padding: 10px 11px; gap: 8px; }
    .console-stat-item i { width: 34px; height: 34px; font-size: 18px; flex: 0 0 34px; }
    .console-stat-item .num { font-size: 16px; }
    .console-stat-item .label { font-size: 11px; }

    .console-card .console-head { padding: 12px 14px; gap: 10px; }
    .console-card .console-icon { width: 38px; height: 38px; font-size: 17px; flex: 0 0 38px; }
    .console-card .console-name { font-size: 14px; }
    .console-card .console-body { padding: 10px 14px; }
    .console-card .console-foot { padding: 9px 14px; }

    .login-card { padding: 26px 18px 20px; border-radius: 16px; }
    .login-logo { width: 54px; height: 54px; border-radius: 14px; }
    .login-logo svg { width: 28px; height: 28px; }
    .login-title { font-size: 18px; }
    .login-foot { margin-top: 22px; padding-top: 14px; }
    .login-foot-row { font-size: 11px; }

    /* 表格操作按钮加大触摸区 */
    .btn-soft { padding: .42rem .7rem; min-height: 34px; }

    /* 仪表盘快捷入口单列 */
    .quick-console-item { padding: 9px 11px; }
}

/* 超小屏手机（≤375px） */
@media (max-width: 375.98px) {
    .content { padding: 10px; }
    .topbar { padding: 8px 10px; }
    .console-statbar { grid-template-columns: 1fr; gap: 8px; }
    .console-stat-item { padding: 9px 10px; }
    .login-card { padding: 22px 14px 18px; }
    .login-title { font-size: 17px; }
}

/* 横屏手机优化 */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 500px) {
    .login-wrap { align-items: flex-start; padding: 16px; }
    .login-card { margin-top: 12px; padding: 20px 22px 16px; }
    .login-brand { margin-bottom: 16px; }
    .login-logo { width: 48px; height: 48px; }
    .login-foot { margin-top: 14px; padding-top: 10px; }
}

/* 滚动条美化 */
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

.icon-picker::-webkit-scrollbar { width: 6px; }
.icon-picker::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.icon-picker::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* 链接按钮交互 */
.btn:focus { box-shadow: none; }
.btn-hive:focus { box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.btn-soft:active { transform: scale(.96); }
.btn-hive:active { transform: translateY(0) scale(.98); }

/* 表格行点击反馈 */
.table tbody tr:active { background: #f0fdf4 !important; }

/* 卡片悬停阴影统一 */
.card.hover-lift { cursor: pointer; }

/* 顶部状态徽章脉冲 */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.badge-status.badge-on i.bi-circle-fill { animation: pulse-dot 2s ease-in-out infinite; }

/* 加载动画 */
.btn .spinner-border { width: 1rem; height: 1rem; }
