/* =========================================================
   前台 · WiFi 直连门户
   ========================================================= */

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 26px 40px;
}

/* ---------- 顶栏 ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px 13px 16px;
    border-radius: 22px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-logo {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(140deg, #6b7bff, #9b5cf6 70%);
    box-shadow: 0 12px 22px rgba(96, 108, 255, .34), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.brand-text { min-width: 0; }
.brand-text h1 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-text p {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

.conn-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: var(--shadow-xs);
}
.conn-pill .dot { animation: pulse 2.4s ease-in-out infinite; }
.conn-pill.on { color: #0a8a79; background: rgba(16, 185, 163, .1); border-color: rgba(16, 185, 163, .22); }
.conn-pill.on .dot { background: var(--mint); }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 163, .18); }
    50%      { box-shadow: 0 0 0 7px rgba(16, 185, 163, .04); }
}

/* ---------- Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: 26px;
    margin-top: 20px;
    padding: 34px 36px;
    border-radius: var(--r-xl);
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(520px 240px at 88% 0%, rgba(139, 92, 246, .12), transparent 70%);
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #4b56d8;
    border-radius: 999px;
    background: rgba(91, 107, 255, .1);
    border: 1px solid rgba(91, 107, 255, .16);
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #5b6bff; }
.hero h2 {
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.24;
    letter-spacing: -.025em;
    font-weight: 800;
}
.hero h2 em {
    font-style: normal;
    background: linear-gradient(120deg, #5b6bff, #a855f7 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead {
    margin-top: 12px;
    max-width: 46ch;
    font-size: 14.5px;
    color: var(--ink-3);
    line-height: 1.75;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: var(--shadow-xs);
}
.meta-chip svg { color: var(--brand); }
.meta-chip b { font-weight: 800; }

/* 装饰球 */
.orb {
    position: relative;
    display: grid;
    place-items: center;
    height: 234px;
}
.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(91, 107, 255, .16);
}
.orb-ring.r1 { width: 216px; height: 216px; }
.orb-ring.r2 { width: 264px; height: 264px; border-style: dashed; border-color: rgba(139, 92, 246, .16); animation: spin 46s linear infinite; }
.orb-ring.r3 { width: 168px; height: 168px; border-color: rgba(16, 185, 163, .18); }
@keyframes spin { to { transform: rotate(360deg); } }

.orb-core {
    position: relative;
    display: grid;
    place-items: center;
    gap: 2px;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    color: var(--brand);
    background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .55));
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 22px 44px rgba(88, 104, 200, .18), inset 0 2px 0 rgba(255, 255, 255, .9),
                inset 0 -6px 16px rgba(158, 173, 199, .18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.orb-core .orb-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.orb-core.on { color: var(--mint); }
.orb-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(91, 107, 255, .12);
}
.orb-dot.d1 { top: 26px; right: 34%; }
.orb-dot.d2 { bottom: 40px; left: 22%; }

/* ---------- 通知 ---------- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 18px;
    border: 1px solid rgba(240, 160, 58, .22);
    background: linear-gradient(140deg, rgba(255, 248, 235, .82), rgba(255, 255, 255, .5));
    box-shadow: var(--shadow-xs);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.notice-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    color: #b0740f;
    background: rgba(240, 160, 58, .16);
}
.notice p { font-size: 13.5px; color: #7a5a22; line-height: 1.65; }
.notice strong { color: #6d4c12; }

/* ---------- 网络列表 ---------- */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 4px 16px;
}
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.section-head .sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.section-tools { display: flex; align-items: center; gap: 10px; }

.wifi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.wcard {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: var(--r-lg);
    transition: transform .3s cubic-bezier(.22, .9, .28, 1), box-shadow .3s ease, border-color .3s ease;
    animation: rise .5s cubic-bezier(.22, .9, .28, 1) both;
    animation-delay: calc(var(--i, 0) * 55ms);
}
.wcard:hover { transform: translateY(-5px); box-shadow: 0 32px 60px rgba(64, 82, 128, .18), inset 0 1px 0 rgba(255, 255, 255, .9); }
.wcard.is-on {
    border-color: rgba(91, 107, 255, .38);
    box-shadow: 0 26px 54px rgba(88, 104, 200, .22), inset 0 0 0 1px rgba(91, 107, 255, .12);
}
.wcard.is-off { opacity: .74; }

.wcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wcard-top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.band {
    padding: 4px 9px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .06em;
    border-radius: 8px;
    flex: none;
}
.band.b24 { color: #0a8a79; background: rgba(16, 185, 163, .14); }
.band.b5  { color: #6d3fd4; background: rgba(139, 92, 246, .14); }
.router-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conn-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    color: #0a8a79;
}
.wcard h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wmeta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 11.5px;
    color: var(--ink-3);
}
.wmeta i { width: 3px; height: 3px; border-radius: 50%; background: rgba(140, 156, 190, .6); }
.wmeta .lock { display: inline-flex; align-items: center; gap: 4px; }

.wcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}
.signal-wrap { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }

/* 空槽位 */
.wcard.empty {
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 186px;
    border: 1.5px dashed rgba(140, 156, 190, .32);
    background: linear-gradient(150deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .18));
    box-shadow: none;
}
.wcard.empty:hover { transform: none; border-color: rgba(91, 107, 255, .34); }
.empty-ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #a3abc4;
    background: rgba(255, 255, 255, .6);
    box-shadow: var(--neu-in-sm);
}
.empty-title { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.empty-sub { font-size: 11.5px; color: var(--muted); text-align: center; }

/* ---------- 使用指引 ---------- */
.guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 30px;
}
.guide-item {
    display: flex;
    gap: 14px;
    padding: 20px;
    border-radius: var(--r-md);
}
.guide-num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    color: #4b56d8;
    background: linear-gradient(145deg, #f3f6fe, #e3e9f7);
    box-shadow: var(--neu-sm);
}
.guide-item h4 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.guide-item p { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }

/* ---------- 页脚 ---------- */
.foot {
    margin-top: 34px;
    padding: 20px 6px 6px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
}
.foot a { color: var(--ink-3); border-bottom: 1px dashed rgba(140, 156, 190, .5); }
.foot a:hover { color: var(--brand); }

/* ---------- 弹层 ---------- */
dialog.sheet {
    width: min(460px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 26px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .95), rgba(246, 249, 255, .88));
    box-shadow: 0 40px 90px rgba(46, 58, 98, .32);
    color: var(--ink);
    overflow: hidden;
}
dialog.sheet::backdrop {
    background: rgba(38, 48, 82, .34);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
}
dialog.sheet[open] { animation: sheetIn .3s cubic-bezier(.22, .9, .28, 1); }
@keyframes sheetIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 22px 12px;
}
.sheet-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head .sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.sheet-body { padding: 4px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet-foot {
    display: flex;
    gap: 10px;
    padding: 16px 22px 20px;
    border-top: 1px solid rgba(140, 156, 190, .16);
    background: rgba(255, 255, 255, .4);
}
.sheet-foot .btn { flex: 1; }

.pass-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(244, 247, 253, .95);
    box-shadow: var(--neu-in-sm);
}
.pass-box .val {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qr-wrap {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(255, 255, 255, .85);
}
.qr-box {
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.qr-box svg, .qr-box canvas, .qr-box img { width: 100%; height: 100%; }
.qr-fallback {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    padding: 6px;
}
.qr-copy h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.qr-copy p { font-size: 12px; color: var(--ink-3); line-height: 1.65; }

.steps { display: flex; flex-direction: column; gap: 8px; }
.steps li {
    display: flex;
    gap: 9px;
    font-size: 12.5px;
    color: var(--ink-3);
    line-height: 1.6;
    list-style: none;
}
.steps { padding: 0; margin: 0; }
.steps li span.n {
    flex: none;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    color: #4b56d8;
    background: rgba(91, 107, 255, .12);
}

/* ---------- 状态页（拉黑 / 维护） ---------- */
.state-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
}
.state-card {
    width: min(520px, 100%);
    padding: 40px 36px 34px;
    text-align: center;
    border-radius: var(--r-xl);
    animation: rise .55s cubic-bezier(.22, .9, .28, 1) both;
}
.state-ico {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 20px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(140deg, #f2687f, #e0425f);
    box-shadow: 0 20px 40px rgba(224, 66, 95, .3), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.state-ico.amber { background: linear-gradient(140deg, #f6b44c, #ef8b2c); box-shadow: 0 20px 40px rgba(239, 139, 44, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.state-ico.mint  { background: linear-gradient(140deg, #2ecfae, #0fa892); box-shadow: 0 20px 40px rgba(16, 185, 163, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.state-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.state-card > p { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); line-height: 1.75; }
.state-kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    margin: 22px 0 24px;
    padding: 16px 18px;
    text-align: left;
    border-radius: 16px;
    background: rgba(255, 255, 255, .5);
    border: 1px solid rgba(255, 255, 255, .75);
    box-shadow: var(--shadow-xs);
}
.state-kv dt { font-size: 12px; color: var(--muted); }
.state-kv dd { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); word-break: break-all; }
.state-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 20px 40px rgba(64, 82, 128, .22);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(.22, .9, .28, 1);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(91, 107, 255, .16); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; padding: 28px; }
    .orb { display: none; }
    .wifi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
    body { font-size: 14px; }
    .shell { padding: 14px 14px 30px; }
    .topbar { padding: 11px 13px; border-radius: 19px; }
    .brand-logo { width: 40px; height: 40px; border-radius: 13px; }
    .brand-text h1 { font-size: 15px; }
    .brand-text p { font-size: 9.5px; letter-spacing: .12em; }
    .conn-pill { padding: 7px 12px; font-size: 11.5px; }
    .conn-pill .label { display: none; }
    .hero { padding: 24px 20px; border-radius: 24px; gap: 18px; }
    .hero h2 { font-size: 25px; }
    .hero-lead { font-size: 13.5px; }
    .hero-meta { gap: 8px; margin-top: 18px; }
    .meta-chip { padding: 7px 11px; font-size: 11.5px; }
    .wifi-grid { grid-template-columns: 1fr; gap: 12px; }
    .section-head { margin-top: 24px; }
    .wcard { padding: 18px; border-radius: 20px; }
    .guide { gap: 12px; }
    .qr-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .sheet-foot { padding: 14px 18px 18px; }
    .state-card { padding: 32px 22px 28px; }
}
