/* 雨诺科技云SAAS —— 样式 */
* { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #ffffff;
    color: #111214;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
img { display: block; }
button, input, select, textarea { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ---------------- 登录 ---------------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #ffffff;
}
.login-card {
    width: min(330px, calc(100vw - 48px));
    aspect-ratio: 1 / 1;
    border: 1px solid #ededf2;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(17, 20, 25, 0.07);
    display: flex;
}
.login-inner {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.delay-tip {
    font-size: 10.5px;
    color: #b8bcc6;
    letter-spacing: .6px;
    text-align: center;
    margin: 0 0 9px;
}
.login-title {
    font-size: 19px;
    font-weight: 600;
    color: #111214;
    text-align: center;
    margin: 0;
    letter-spacing: .3px;
}
.login-sub {
    font-size: 12px;
    color: #a0a4ad;
    text-align: center;
    margin: 6px 0 17px;
}
.linp {
    width: 100%;
    height: 42px;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13.5px;
    box-sizing: border-box;
    outline: none;
    background: #fff;
    color: #111214;
}
.linp:focus { border-color: #ffb27d; }
.login-err {
    font-size: 12px;
    color: #e0322f;
    margin: 9px 0 0;
    min-height: 16px;
    line-height: 16px;
    text-align: center;
}
.lbtn {
    margin-top: 6px;
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 9px;
    background: #ff7a1a;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
}
.lbtn:active { background: #ef6a0c; }
.lbtn:disabled { background: #ffbb8d; }

/* ---------------- 封禁页 ---------------- */
.banned-wrap {
    padding: 40px 30px;
    text-align: center;
}
.banned-text {
    color: #e0322f;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    margin: 0 0 12px;
}
.banned-sub { color: #9aa0ac; font-size: 12.5px; margin: 0 0 26px; }
.banned-back {
    display: inline-block;
    padding: 9px 22px;
    border: 1px solid #e2e5ea;
    border-radius: 999px;
    color: #5a5d68;
    font-size: 13px;
    text-decoration: none;
}

/* ---------------- 顶栏 ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 54px;
    background: #fff;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    padding: 0 14px;
    box-sizing: border-box;
}
.burger {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.burger i {
    display: block;
    width: 19px;
    height: 1.8px;
    background: #111214;
    border-radius: 2px;
}
.brand {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    margin-left: 10px;
    color: #111214;
    letter-spacing: .2px;
}
.brand small {
    display: block;
    font-size: 10.5px;
    color: #a0a4ad;
    font-weight: 400;
    letter-spacing: .4px;
    margin-top: 1px;
}
.logout {
    text-decoration: none;
    border: 1px solid #e6e9ee;
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12.5px;
    color: #5a5d68;
    cursor: pointer;
}

/* ---------------- 抽屉（黑底白高亮） ---------------- */
.drawer {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 232px;
    background: #101113;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .24s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    padding: 22px 20px 16px;
    border-bottom: 1px solid #1e1f24;
}
.drawer-head b {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.drawer-head span {
    display: block;
    color: #6d717c;
    font-size: 11.5px;
    margin-top: 4px;
}
.drawer-list { padding: 10px 0; flex: 1; }
.drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 13.5px;
    color: #a8acb6;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.drawer-item.active {
    background: #ffffff;
    color: #111214;
    font-weight: 600;
}
.drawer-item .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3a3d45;
    flex: 0 0 5px;
}
.drawer-item.active .dot { background: #ff7a1a; }
.drawer-item { text-decoration: none; }
.drawer-list a.drawer-item { text-decoration: none; }
.mask {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 13, .38);
    z-index: 55;
    display: none;
}
.mask.show { display: block; }

/* ---------------- 页面主体 ---------------- */
.main { padding: 14px 14px 40px; max-width: 760px; margin: 0 auto; }
.sec { display: none; }
.sec.on { display: block; }
.page-title {
    font-size: 17px;
    font-weight: 600;
    margin: 4px 0 14px;
    color: #111214;
}

/* 三个正方形 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.stat-sq {
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(17, 20, 25, .04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow: hidden;
}
.stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #111214;
    line-height: 1;
    letter-spacing: -.5px;
}
.stat-lab { font-size: 11.5px; color: #9aa0ac; }

/* 加号半长方形 */
.add-bar { margin-bottom: 12px; }
.add-btn {
    width: 52%;
    max-width: 210px;
    min-width: 150px;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: #ff7a1a;
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(255, 122, 26, .22);
}
.add-btn:active { background: #ef6a0c; }
.add-btn:disabled { background: #ffbb8d; }

/* 列表 */
.card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 4px 14px;
    box-shadow: 0 4px 16px rgba(17, 20, 25, .04);
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    border-bottom: 1px solid #f3f4f7;
}
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f6f9;
}
.row:last-child { border-bottom: 0; }
.ava {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    flex: 0 0 40px;
    background: #f2f3f6;
    color: #6b7080;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.row-main { flex: 1; min-width: 0; }
.row-name {
    font-size: 14px;
    font-weight: 600;
    color: #111214;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-sub {
    font-size: 11.5px;
    color: #9aa0ac;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.sbtn {
    border: 1px solid #ffd2b2;
    background: #fff5ee;
    color: #ea6410;
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.sbtn:active { background: #ffe8d8; }
.sbtn.orange { border-color: #ffd4b6; color: #ef6a0c; }
.sbtn.danger { border-color: #f7d3d2; background: #fff; color: #d8392f; }
.empty {
    text-align: center;
    color: #a8acb6;
    font-size: 12.5px;
    padding: 26px 0;
}

/* 开关标签 */
.tag {
    display: inline-block;
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f4f5f8;
    color: #7b8091;
    margin-left: 6px;
    vertical-align: 1px;
}
.tag.orange { background: #fff2e8; color: #ef6a0c; }
.tag.dark { background: #111214; color: #fff; }

/* ---------------- 弹窗 ---------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
}
.modal.show { display: block; }
.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 13, .4);
}
.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0 0 18px;
    animation: up .22s ease;
}
@keyframes up { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head {
    position: sticky;
    top: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #f2f3f6;
    z-index: 1;
}
.sheet-head b { font-size: 15px; font-weight: 600; }
.modal-x {
    border: 0;
    background: transparent;
    font-size: 20px;
    color: #9aa0ac;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.sheet-body { padding: 14px 18px 4px; }
.lab {
    display: block;
    font-size: 12.5px;
    color: #5a5d68;
    margin: 12px 0 6px;
}
.lab:first-child { margin-top: 0; }
.inp {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e5ea;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    background: #fff;
    color: #111214;
    appearance: none;
}
.inp:focus { border-color: #ffb27d; }
input[type="file"].inp {
    height: auto;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.6;
}
.days-row { display: flex; gap: 8px; align-items: center; }
.days-row .inp { flex: 1; }
.chip {
    border: 1px solid #e6e9ee;
    background: #fff;
    border-radius: 9px;
    height: 44px;
    padding: 0 14px;
    font-size: 12.5px;
    color: #5a5d68;
    cursor: pointer;
    white-space: nowrap;
}
.chip.on { border-color: #ffb27d; color: #ef6a0c; background: #fff7f1; }
.hint { font-size: 11.5px; color: #a8acb6; margin: 8px 0 0; line-height: 1.7; }
.sheet-foot { margin-top: 18px; }
.bbtn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 11px;
    background: #ff7a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
}
.bbtn:active { background: #ef6a0c; }
.bbtn:disabled { background: #ffbb8d; }
.bbtn.gray { background: #f2f3f6; color: #5a5d68; }

/* 详情弹窗 */
.detail-top { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; }
.detail-ava { width: 46px; height: 46px; border-radius: 13px; }
.dl { border-top: 1px solid #f3f4f7; }
.dl-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #f6f7fa;
    font-size: 13px;
}
.dl-k { color: #9aa0ac; flex: 0 0 78px; }
.dl-v { color: #111214; text-align: right; word-break: break-all; flex: 1; }
.dl-v a { color: #ef6a0c; text-decoration: none; }

/* 加载 */
.loading {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(255, 255, 255, .88);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}
.loading.show { display: flex; }
.spin {
    width: 30px;
    height: 30px;
    border: 2.5px solid #ffe0c8;
    border-top-color: #ff7a1a;
    border-radius: 50%;
    animation: sp .8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.loading-txt { font-size: 12.5px; color: #7b8091; }

/* 轻提示 */
.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translate(-50%, 10px);
    background: rgba(17, 18, 20, .92);
    color: #fff;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 9px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    z-index: 100;
    max-width: 80vw;
    text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 代理管理的小正方形加号 */
.add-btn.add-square {
    width: 54px;
    min-width: 54px;
    height: 54px;
    padding: 0;
}

/* 安装页 */
.install-wrap {
    max-width: 460px;
    margin: 0 auto;
    padding: 26px 18px 50px;
}
.install-title { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.install-sub { font-size: 12.5px; color: #9aa0ac; margin: 0 0 20px; line-height: 1.7; }
.install-box {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(17, 20, 25, .04);
}
.install-msg { font-size: 13px; color: #d8392f; margin: 12px 0 0; line-height: 1.7; }
.install-ok { font-size: 13px; color: #14934a; margin: 12px 0 0; line-height: 1.7; }

/* 代理行：信息一行，按钮一行 */
.agent-row { padding: 13px 0; border-bottom: 1px solid #f5f6f9; }
.agent-row:last-child { border-bottom: 0; }
.row-top { display: flex; align-items: center; gap: 10px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 9px; }

/* ---------------- 本批新增 ---------------- */

/* 余额卡（代理端添加站点顶部） */
.balance-card {
    margin: 0 auto 14px;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, #ff8a2b, #ff6a00);
    border-radius: 16px;
    padding: 18px 18px 16px;
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 106, 0, .22);
    text-align: center;
}
.balance-lab { font-size: 12px; opacity: .9; letter-spacing: .5px; }
.balance-num {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.5px;
    margin: 6px 0 4px;
    line-height: 1.1;
    word-break: break-all;
}
.balance-tip { font-size: 11.5px; opacity: .82; }

/* 代理管理顶部：加号 + 停止登录开关 */
.btn-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.btn-row .add-btn { flex: 0 0 auto; }
.toggle-btn {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: 1px solid #e6e9ee;
    border-radius: 12px;
    background: #fff;
    color: #5a5d68;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 0 10px;
    cursor: pointer;
}
.toggle-btn b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #111214;
    margin-top: 2px;
    letter-spacing: 1px;
}
.toggle-btn.on {
    border-color: #ff7a1a;
    background: #fff5ee;
    color: #ea6410;
}
.toggle-btn.on b { color: #ea6410; }

/* 交付模板：三个一排 */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.tpl-card {
    text-align: left;
    border: 1px solid #eef0f4;
    background: #fff;
    border-radius: 12px;
    padding: 12px 10px;
    cursor: pointer;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(17, 20, 25, .04);
}
.tpl-card b {
    font-size: 12.5px;
    color: #111214;
    font-weight: 600;
    word-break: break-all;
    line-height: 1.4;
}
.tpl-card span {
    font-size: 10.8px;
    color: #9aa0ac;
    line-height: 1.5;
    word-break: break-all;
}
.tpl-card.on {
    border-color: #ff7a1a;
    background: #fff7f1;
}
.tpl-card.on b { color: #ea6410; }

/* 多行输入 */
.txa {
    height: 130px;
    padding: 10px 12px;
    line-height: 1.7;
    resize: vertical;
}

/* 公告 */
.notice-img { width: 100%; border-radius: 12px; margin-bottom: 12px; }
.notice-text { font-size: 13.5px; line-height: 1.8; color: #33363d; }
.notice-prev { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.notice-prev img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; }

/* 代理操作记录 */
.log-list { margin-top: 10px; }
.log-item {
    padding: 10px 0;
    border-top: 1px solid #f4f5f8;
    font-size: 12px;
    color: #5a5d68;
}
.log-item span { color: #9aa0ac; font-size: 11px; }
.log-item b {
    margin-left: 8px;
    font-size: 10.5px;
    color: #ea6410;
    background: #fff4ec;
    border-radius: 5px;
    padding: 1px 6px;
    font-weight: 600;
}
.log-item p { margin: 5px 0 0; line-height: 1.6; color: #33363d; word-break: break-all; }
