/* 土豆彩票AI大数据分析平台 —— 全站样式 */

:root {
    --bg: #f4f6fa;
    --panel: #ffffff;
    --border: #e4e8f0;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #c2410c;
    --primary-dark: #9a3412;
    --accent: #dc2626;
    --blue: #2563eb;
    --green: #059669;
    --red-ball: linear-gradient(145deg, #ef4444, #b91c1c);
    --blue-ball: linear-gradient(145deg, #3b82f6, #1d4ed8);
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 208px;
    background: #1e2430;
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand h1 {
    font-size: 17px; line-height: 1.4;
    background: linear-gradient(90deg, #fca5a5, #fdba74, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}
.brand .sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }

.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    color: #cbd5e1;
    transition: background .15s, color .15s;
    user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(194, 65, 12, .95), rgba(234, 88, 12, .75));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #fdba74;
}
.nav-item .ico { width: 20px; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏：彩种切换 */
.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .title { font-weight: 700; font-size: 15px; margin-right: 6px; }

.lot-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.lot-tab {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    transition: all .15s;
}
.lot-tab:hover { border-color: var(--primary); color: var(--primary); }
.lot-tab.active {
    background: linear-gradient(135deg, #f97316, #c2410c);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(234, 88, 12, .3);
}

.content { padding: 18px 20px 40px; flex: 1; }

.page { display: none; }
.page.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------- 通用组件 ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.card h3 {
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 9px;
    border-left: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card h3 .right { font-size: 12px; color: var(--muted); font-weight: 400; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary {
    background: linear-gradient(135deg, #f97316, #c2410c);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, .35);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.danger { color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.data th {
    text-align: left;
    padding: 9px 10px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
table.data td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data tr.rowclick { cursor: pointer; }
table.data tr.rowclick:hover { background: #fff7ed; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.tag.可用 { background: #dcfce7; color: #166534; }
.tag.已覆盖 { background: #dbeafe; color: #1e40af; }
.tag.规划中 { background: #f3f4f6; color: #6b7280; }
.tag.win { background: #dcfce7; color: #166534; }
.tag.lose { background: #fee2e2; color: #991b1b; }
.tag.pending { background: #fef9c3; color: #854d0e; }

/* 号码球 */
.balls { display: inline-flex; gap: 5px; vertical-align: middle; }
.ball {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fca5a5, #ef4444 45%, #991b1b);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .2), 0 2px 4px rgba(185, 28, 28, .25);
}
.ball.blue {
    background: radial-gradient(circle at 30% 25%, #93c5fd, #3b82f6 45%, #1e3a8a);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .2), 0 2px 4px rgba(37, 99, 235, .25);
}
.ball.sm { width: 24px; height: 24px; font-size: 11px; }
.ball.ghost { background: #e5e7eb; color: #9ca3af; box-shadow: none; }

.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.money { text-align: right; font-variant-numeric: tabular-nums; }

/* 号码芯片（过滤/统计用） */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
    min-width: 30px; height: 28px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    transition: all .1s;
}
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

.cond-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
}
.cond-row:last-child { border-bottom: none; }
.cond-label {
    width: 92px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 13px;
    padding-top: 4px;
}
.cond-body { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.mode-switch span {
    padding: 4px 10px; font-size: 12px; cursor: pointer; background: #fff; color: var(--muted);
}
.mode-switch span.on { background: var(--blue); color: #fff; }

/* 统计条形图 */
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.bar-label { width: 34px; text-align: right; font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; background: #f1f5f9; border-radius: 4px; height: 18px; overflow: hidden; }
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    border-radius: 4px;
    min-width: 1px;
    transition: width .3s;
}
.bar-fill.hot { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.bar-fill.cold { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.bar-val { width: 44px; font-size: 12px; color: var(--muted); flex-shrink: 0; }

.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    min-width: 150px;
    box-shadow: var(--shadow);
    border-left: 4px solid #f97316;
    transition: transform .15s;
}
.stat-card:nth-child(2) { border-left-color: #3b82f6; }
.stat-card:nth-child(3) { border-left-color: #22c55e; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card .k { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.stat-card .v { font-size: 20px; font-weight: 700; }
.stat-card .v small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* 走势图（500 网风格引擎） */
.trend-toolbar {
    display: flex; align-items: center;
    padding: 8px 12px;
    background: #fdf8f2;
    border: 1px solid #f0e3d3; border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
}
.trend-nav {
    display: flex;
    background: linear-gradient(180deg, #fb923c, #ea580c);
    overflow-x: auto;
    border-radius: 0;
}
.trend-nav span {
    padding: 10px 20px;
    color: #ffedd5;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, .18);
    transition: background .12s;
}
.trend-nav span:hover { background: rgba(255, 255, 255, .12); }
.trend-nav span.on {
    background: #fff7ed;
    color: #9a3412;
    font-weight: 700;
    border-radius: 6px 6px 0 0;
}
.trend-body {
    border: 1px solid #f0e3d3;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    padding: 0 0 14px;
    background: #fff;
}
.tt-box { position: relative; display: block; margin: 10px 12px 0; overflow-x: auto; overflow-y: hidden; }
svg.tlines {
    position: absolute; left: 0; top: 0;
    pointer-events: none;
    z-index: 5;
}
table.tt { border-collapse: collapse; font-size: 12px; background: #fff; position: relative; }
table.tt th, table.tt td {
    width: 30px; height: 30px;
    min-width: 30px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #f3e8d8;
    padding: 0;
}
table.tt thead tr:first-child th {
    background: linear-gradient(180deg, #fdf1e2, #fbead4);
    color: #7c2d12; font-weight: 700; height: 26px; font-size: 12px;
    border-bottom: 2px solid #eecfa8;
}
table.tt thead tr:last-child th { background: #faf5ec; color: #92400e; height: 22px; font-weight: 600; }
table.tt .fix-col { min-width: 86px; width: 86px; background: #fdfaf5; }
table.tt .date-col { min-width: 64px; width: 64px; color: #a8a29e; }
table.tt .gsep { border-right: 2px solid #e8c9a6; }
table.tt td.tmiss { color: #cbbba8; font-size: 11px; }
table.tt th.w2, table.tt td.w2 { width: 46px; min-width: 46px; }
table.tt td.thit { position: relative; z-index: 6; border-color: transparent; }
table.tt i.tb {
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fca5a5, #ef4444 48%, #b91c1c);
    color: #fff; font-weight: 700; font-size: 12px;
    font-style: normal;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: 0 1px 3px rgba(185, 28, 28, .4);
}
table.tt i.tb.blue {
    background: radial-gradient(circle at 30% 25%, #93c5fd, #3b82f6 48%, #1d4ed8);
    box-shadow: 0 1px 3px rgba(37, 99, 235, .4);
}
table.tt i.tb.pill {
    width: auto; min-width: 34px;
    height: 21px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 11px;
}

/* 旧版走势表（保留兼容） */
.trend-wrap { overflow-x: auto; }
table.trend { border-collapse: collapse; font-size: 11px; }
table.trend th, table.trend td {
    width: 26px; height: 26px;
    min-width: 26px;
    text-align: center;
    border: 1px solid #eef1f6;
    padding: 0;
}
table.trend th { background: #f8fafc; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.trend td.hit {
    background: var(--red-ball);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    border-color: transparent;
}
table.trend td.hit.blue { background: var(--blue-ball); }
table.trend td.skip { color: #cbd5e1; }
table.trend .issue-col { min-width: 74px; width: 74px; font-variant-numeric: tabular-nums; color: var(--muted); }
table.trend .date-col { min-width: 86px; width: 86px; color: var(--muted); }

/* 弹窗 */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 12px;
    width: min(680px, 92vw);
    max-height: 86vh;
    overflow-y: auto;
    padding: 20px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.modal h3 { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.modal .close {
    cursor: pointer; font-size: 20px; color: var(--muted); line-height: 1; padding: 4px;
}
.modal .close:hover { color: var(--accent); }

/* 过滤结果 */
.result-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
}
.result-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px;
    max-height: 320px; overflow-y: auto;
}
.result-token {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 首页 */
.hero-balls { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px 12px;
    min-width: 300px;
    flex: 1;
    box-shadow: var(--shadow);
    border-top: 3px solid transparent;
    background-image: linear-gradient(#fff, #fff),
        linear-gradient(90deg, #ef4444, #f97316, #facc15, #22c55e, #3b82f6, #8b5cf6);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: transform .18s, box-shadow .18s;
}
.hero-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(16, 24, 40, .12);
}
.hero-item .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hero-item .head .name { font-weight: 700; font-size: 15px; }
.hero-item .head .issue { color: var(--muted); font-size: 12px; }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; padding: 14px 0 4px; }

.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.pager .info { color: var(--muted); font-size: 12px; margin-right: auto; }

.toast {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    background: #1f2937; color: #fff;
    padding: 9px 18px; border-radius: 8px;
    font-size: 13px; z-index: 999;
    animation: fadeIn .2s;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.toast.err { background: #b91c1c; }

/* ---------- 登录 / 注册（极简版） ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(249, 115, 22, .16), transparent 60%),
        radial-gradient(700px 420px at -10% 110%, rgba(37, 99, 235, .12), transparent 60%),
        linear-gradient(160deg, #fbfaf8 0%, #f6f1ea 100%);
}
.auth-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(28, 20, 12, .12), 0 2px 8px rgba(28, 20, 12, .05);
    padding: 40px 38px 28px;
    width: min(360px, 92vw);
    text-align: center;
}
.auth-logo {
    width: 76px; height: 76px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fdba74, #ea580c);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 24px rgba(234, 88, 12, .35);
    transform: rotate(-6deg);
}
.auth-card h1 { font-size: 24px; letter-spacing: 2px; margin-bottom: 20px; }
.auth-notice {
    font-size: 12px; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: 8px; padding: 6px 10px; margin-bottom: 14px;
}
.auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 18px;
}
.auth-tabs span {
    flex: 1;
    padding: 8px 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    border-radius: 8px;
    transition: all .15s;
}
.auth-tabs span.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card input {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}
.auth-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, .12); }
.auth-card .btn { justify-content: center; padding: 12px; font-size: 15px; margin-top: 4px; }
.auth-foot { font-size: 11px; color: #c0c6d1; margin-top: 18px; letter-spacing: 1px; }

/* ---------- 侧栏子菜单 / 底部用户区 ---------- */
.nav-group { margin: 0; }
.nav-item.has-sub { position: relative; }
.nav-item .arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform .15s;
}
.sub-menu { padding: 2px 0 6px; }
.sub-group {
    padding: 8px 16px 4px 42px;
    font-size: 11px;
    color: #64748b;
    letter-spacing: 2px;
}
.sub-item {
    padding: 7px 14px 7px 46px;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 6px;
    margin: 1px 8px;
}
.sub-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.sidebar-foot {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.me-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 8px;
}
.me-box .credits { color: #fbbf24; font-weight: 700; }
.me-actions { display: flex; gap: 6px; }
.me-actions .btn { flex: 1; justify-content: center; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #e2e8f0; }
.me-actions .btn:hover { background: rgba(255,255,255,.16); color: #fff; }

.echart { width: 100%; }
/* 土豆彩票AI大数据分析平台 —— 全站样式 */

:root {
    --bg: #f4f6fa;
    --panel: #ffffff;
    --border: #e4e8f0;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #c2410c;
    --primary-dark: #9a3412;
    --accent: #dc2626;
    --blue: #2563eb;
    --green: #059669;
    --red-ball: linear-gradient(145deg, #ef4444, #b91c1c);
    --blue-ball: linear-gradient(145deg, #3b82f6, #1d4ed8);
    --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 208px;
    background: #1e2430;
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand h1 {
    font-size: 17px; line-height: 1.4;
    background: linear-gradient(90deg, #fca5a5, #fdba74, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}
.brand .sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }

.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    color: #cbd5e1;
    transition: background .15s, color .15s;
    user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(194, 65, 12, .95), rgba(234, 88, 12, .75));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #fdba74;
}
.nav-item .ico { width: 20px; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏：彩种切换 */
.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .title { font-weight: 700; font-size: 15px; margin-right: 6px; }

.lot-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.lot-tab {
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    transition: all .15s;
}
.lot-tab:hover { border-color: var(--primary); color: var(--primary); }
.lot-tab.active {
    background: linear-gradient(135deg, #f97316, #c2410c);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(234, 88, 12, .3);
}

.content { padding: 18px 20px 40px; flex: 1; }

.page { display: none; }
.page.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ---------- 通用组件 ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.card h3 {
    font-size: 14px;
    margin-bottom: 12px;
    padding-left: 9px;
    border-left: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card h3 .right { font-size: 12px; color: var(--muted); font-weight: 400; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary {
    background: linear-gradient(135deg, #f97316, #c2410c);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, .35);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.danger { color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.data th {
    text-align: left;
    padding: 9px 10px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
table.data td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data tr.rowclick { cursor: pointer; }
table.data tr.rowclick:hover { background: #fff7ed; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.tag.可用 { background: #dcfce7; color: #166534; }
.tag.已覆盖 { background: #dbeafe; color: #1e40af; }
.tag.规划中 { background: #f3f4f6; color: #6b7280; }
.tag.win { background: #dcfce7; color: #166534; }
.tag.lose { background: #fee2e2; color: #991b1b; }
.tag.pending { background: #fef9c3; color: #854d0e; }

/* 号码球 */
.balls { display: inline-flex; gap: 5px; vertical-align: middle; }
.ball {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fca5a5, #ef4444 45%, #991b1b);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .2), 0 2px 4px rgba(185, 28, 28, .25);
}
.ball.blue {
    background: radial-gradient(circle at 30% 25%, #93c5fd, #3b82f6 45%, #1e3a8a);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .2), 0 2px 4px rgba(37, 99, 235, .25);
}
.ball.sm { width: 24px; height: 24px; font-size: 11px; }
.ball.ghost { background: #e5e7eb; color: #9ca3af; box-shadow: none; }

.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.money { text-align: right; font-variant-numeric: tabular-nums; }

/* 号码芯片（过滤/统计用） */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
    min-width: 30px; height: 28px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    transition: all .1s;
}
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

.cond-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
}
.cond-row:last-child { border-bottom: none; }
.cond-label {
    width: 92px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 13px;
    padding-top: 4px;
}
.cond-body { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.mode-switch span {
    padding: 4px 10px; font-size: 12px; cursor: pointer; background: #fff; color: var(--muted);
}
.mode-switch span.on { background: var(--blue); color: #fff; }

/* 统计条形图 */
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.bar-label { width: 34px; text-align: right; font-weight: 600; flex-shrink: 0; }
.bar-track { flex: 1; background: #f1f5f9; border-radius: 4px; height: 18px; overflow: hidden; }
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    border-radius: 4px;
    min-width: 1px;
    transition: width .3s;
}
.bar-fill.hot { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.bar-fill.cold { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.bar-val { width: 44px; font-size: 12px; color: var(--muted); flex-shrink: 0; }

.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    min-width: 150px;
    box-shadow: var(--shadow);
    border-left: 4px solid #f97316;
    transition: transform .15s;
}
.stat-card:nth-child(2) { border-left-color: #3b82f6; }
.stat-card:nth-child(3) { border-left-color: #22c55e; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card .k { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.stat-card .v { font-size: 20px; font-weight: 700; }
.stat-card .v small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* 走势图（500 网风格引擎） */
.trend-toolbar {
    display: flex; align-items: center;
    padding: 8px 12px;
    background: #fdf8f2;
    border: 1px solid #f0e3d3; border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
}
.trend-nav {
    display: flex;
    background: linear-gradient(180deg, #fb923c, #ea580c);
    overflow-x: auto;
    border-radius: 0;
}
.trend-nav span {
    padding: 10px 20px;
    color: #ffedd5;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, .18);
    transition: background .12s;
}
.trend-nav span:hover { background: rgba(255, 255, 255, .12); }
.trend-nav span.on {
    background: #fff7ed;
    color: #9a3412;
    font-weight: 700;
    border-radius: 6px 6px 0 0;
}
.trend-body {
    border: 1px solid #f0e3d3;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow-x: auto;
    padding: 0 0 14px;
    background: #fff;
}
.tt-box { position: relative; display: block; margin: 10px 12px 0; overflow-x: auto; overflow-y: hidden; }
svg.tlines {
    position: absolute; left: 0; top: 0;
    pointer-events: none;
    z-index: 5;
}
table.tt { border-collapse: collapse; font-size: 12px; background: #fff; position: relative; }
table.tt th, table.tt td {
    width: 30px; height: 30px;
    min-width: 30px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #f3e8d8;
    padding: 0;
}
table.tt thead tr:first-child th {
    background: linear-gradient(180deg, #fdf1e2, #fbead4);
    color: #7c2d12; font-weight: 700; height: 26px; font-size: 12px;
    border-bottom: 2px solid #eecfa8;
}
table.tt thead tr:last-child th { background: #faf5ec; color: #92400e; height: 22px; font-weight: 600; }
table.tt .fix-col { min-width: 86px; width: 86px; background: #fdfaf5; }
table.tt .date-col { min-width: 64px; width: 64px; color: #a8a29e; }
table.tt .gsep { border-right: 2px solid #e8c9a6; }
table.tt td.tmiss { color: #cbbba8; font-size: 11px; }
table.tt th.w2, table.tt td.w2 { width: 46px; min-width: 46px; }
table.tt td.thit { position: relative; z-index: 6; border-color: transparent; }
table.tt i.tb {
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fca5a5, #ef4444 48%, #b91c1c);
    color: #fff; font-weight: 700; font-size: 12px;
    font-style: normal;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: 0 1px 3px rgba(185, 28, 28, .4);
}
table.tt i.tb.blue {
    background: radial-gradient(circle at 30% 25%, #93c5fd, #3b82f6 48%, #1d4ed8);
    box-shadow: 0 1px 3px rgba(37, 99, 235, .4);
}
table.tt i.tb.pill {
    width: auto; min-width: 34px;
    height: 21px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 11px;
}

/* 旧版走势表（保留兼容） */
.trend-wrap { overflow-x: auto; }
table.trend { border-collapse: collapse; font-size: 11px; }
table.trend th, table.trend td {
    width: 26px; height: 26px;
    min-width: 26px;
    text-align: center;
    border: 1px solid #eef1f6;
    padding: 0;
}
table.trend th { background: #f8fafc; color: var(--muted); font-weight: 600; position: sticky; top: 0; }
table.trend td.hit {
    background: var(--red-ball);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    border-color: transparent;
}
table.trend td.hit.blue { background: var(--blue-ball); }
table.trend td.skip { color: #cbd5e1; }
table.trend .issue-col { min-width: 74px; width: 74px; font-variant-numeric: tabular-nums; color: var(--muted); }
table.trend .date-col { min-width: 86px; width: 86px; color: var(--muted); }

/* 弹窗 */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 12px;
    width: min(680px, 92vw);
    max-height: 86vh;
    overflow-y: auto;
    padding: 20px 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.modal h3 { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.modal .close {
    cursor: pointer; font-size: 20px; color: var(--muted); line-height: 1; padding: 4px;
}
.modal .close:hover { color: var(--accent); }

/* 过滤结果 */
.result-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
}
.result-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px;
    max-height: 320px; overflow-y: auto;
}
.result-token {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* 首页 */
.hero-balls { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px 12px;
    min-width: 300px;
    flex: 1;
    box-shadow: var(--shadow);
    border-top: 3px solid transparent;
    background-image: linear-gradient(#fff, #fff),
        linear-gradient(90deg, #ef4444, #f97316, #facc15, #22c55e, #3b82f6, #8b5cf6);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: transform .18s, box-shadow .18s;
}
.hero-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(16, 24, 40, .12);
}
.hero-item .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.hero-item .head .name { font-weight: 700; font-size: 15px; }
.hero-item .head .issue { color: var(--muted); font-size: 12px; }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; padding: 14px 0 4px; }

.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.pager .info { color: var(--muted); font-size: 12px; margin-right: auto; }

.toast {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    background: #1f2937; color: #fff;
    padding: 9px 18px; border-radius: 8px;
    font-size: 13px; z-index: 999;
    animation: fadeIn .2s;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.toast.err { background: #b91c1c; }

/* ---------- 登录 / 注册（极简版） ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(249, 115, 22, .16), transparent 60%),
        radial-gradient(700px 420px at -10% 110%, rgba(37, 99, 235, .12), transparent 60%),
        linear-gradient(160deg, #fbfaf8 0%, #f6f1ea 100%);
}
.auth-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(28, 20, 12, .12), 0 2px 8px rgba(28, 20, 12, .05);
    padding: 40px 38px 28px;
    width: min(360px, 92vw);
    text-align: center;
}
.auth-logo {
    width: 76px; height: 76px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fdba74, #ea580c);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 24px rgba(234, 88, 12, .35);
    transform: rotate(-6deg);
}
.auth-card h1 { font-size: 24px; letter-spacing: 2px; margin-bottom: 20px; }
.auth-notice {
    font-size: 12px; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: 8px; padding: 6px 10px; margin-bottom: 14px;
}
.auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 18px;
}
.auth-tabs span {
    flex: 1;
    padding: 8px 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    border-radius: 8px;
    transition: all .15s;
}
.auth-tabs span.active {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card input {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}
.auth-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, .12); }
.auth-card .btn { justify-content: center; padding: 12px; font-size: 15px; margin-top: 4px; }
.auth-foot { font-size: 11px; color: #c0c6d1; margin-top: 18px; letter-spacing: 1px; }

/* ---------- 侧栏子菜单 / 底部用户区 ---------- */
.nav-group { margin: 0; }
.nav-item.has-sub { position: relative; }
.nav-item .arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform .15s;
}
.sub-menu { padding: 2px 0 6px; }
.sub-group {
    padding: 8px 16px 4px 42px;
    font-size: 11px;
    color: #64748b;
    letter-spacing: 2px;
}
.sub-item {
    padding: 7px 14px 7px 46px;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
    border-radius: 6px;
    margin: 1px 8px;
}
.sub-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.sidebar-foot {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.me-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e2e8f0;
    font-size: 13px;
    margin-bottom: 8px;
}
.me-box .credits { color: #fbbf24; font-weight: 700; }
.me-actions { display: flex; gap: 6px; }
.me-actions .btn { flex: 1; justify-content: center; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: #e2e8f0; }
.me-actions .btn:hover { background: rgba(255,255,255,.16); color: #fff; }

.echart { width: 100%; }


/* ---------- 选号器（官方规则版） ---------- */
.pick-grid { margin: 12px 0 2px; }
.pick-grid .pg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.pg-title { font-weight: 600; font-size: 13px; }
.pg-count { font-size: 12px; color: var(--primary); font-weight: 600; }
.pg-acts { margin-left: auto; display: flex; gap: 10px; }
.pg-acts a { font-size: 12px; color: var(--primary); cursor: pointer; }
.pg-acts a:hover { text-decoration: underline; }
.pballs { display: flex; flex-wrap: wrap; gap: 6px; }
.pball {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #64748b;
    background: #f8fafc; border: 1px solid var(--border);
    cursor: pointer; user-select: none; transition: all .12s;
}
.pball:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pball.on {
    background: radial-gradient(circle at 30% 25%, #fca5a5, #ef4444 48%, #991b1b);
    color: #fff; border-color: transparent;
    box-shadow: 0 2px 5px rgba(185, 28, 28, .35);
}
.pball.bblue.on {
    background: radial-gradient(circle at 30% 25%, #93c5fd, #3b82f6 48%, #1d4ed8);
    box-shadow: 0 2px 5px rgba(37, 99, 235, .35);
}
.pick-bar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    margin-top: 14px; padding: 10px 16px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa; border-radius: 10px;
}
.pick-bar .calc { font-size: 14px; }
.pick-bar .calc b { color: #c2410c; font-size: 17px; }
.ticket-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 8px 0; border-bottom: 1px dashed var(--border);
}
/* 胆码：金环标记 */
.ball.dan-ball { outline: 2px solid #f59e0b; outline-offset: 1px; }
