/* ============================================================
   MroRecharge —— AA 蓝白（与游戏内 overlay 同一套色调）
   主色 #1d5fb4 / 行高 27px / 白卡片 + 浅蓝底
   ============================================================ */
:root {
    --aa-blue: #1d5fb4;
    --aa-blue-d: #164a8c;
    --aa-blue-l: #3d82d8;
    --aa-bg: #eef3fa;
    --aa-line: #d6e2f2;
    --aa-text: #1c2b3a;
    --aa-sub: #5f7590;
    --aa-warn: #b4451d;
    --aa-ok: #1a7a4c;
    --row: 27px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--aa-bg);
    color: var(--aa-text);
    font: 14px/1.65 "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
}

a { color: var(--aa-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 48px; }

/* ---------- 顶栏 ---------- */
.topbar {
    background: var(--aa-blue);
    color: #fff;
    border-bottom: 2px solid var(--aa-blue-d);
}
.topbar .inner {
    max-width: 980px; margin: 0 auto; padding: 0 16px;
    height: 48px; display: flex; align-items: center; gap: 14px;
}
.topbar .brand { font-size: 15px; font-weight: 500; letter-spacing: .5px; }
.topbar .brand small { font-weight: 400; opacity: .8; margin-left: 8px; font-size: 12px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; opacity: .95; }
.topbar a { color: #fff; font-size: 13px; }

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border: 1px solid var(--aa-line);
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}
.card > h2 {
    margin: 0;
    padding: 0 14px;
    height: 38px; line-height: 38px;
    font-size: 14px; font-weight: 500;
    color: var(--aa-blue-d);
    background: linear-gradient(#f7fbff, #eef4fc);
    border-bottom: 1px solid var(--aa-line);
}
.card .body { padding: 14px; }

/* ---------- 商品 ---------- */
.goods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goods .item {
    border: 1px solid var(--aa-line);
    border-radius: 6px;
    background: #fbfdff;
    padding: 12px 12px 10px;
    text-align: center;
    transition: border-color .15s;
}
.goods .item:hover { border-color: var(--aa-blue-l); }
.goods .cp { font-size: 19px; font-weight: 500; color: var(--aa-blue-d); line-height: 1.3; }
.goods .cp small { font-size: 12px; font-weight: 400; color: var(--aa-sub); margin-left: 3px; }
.goods .price { color: var(--aa-warn); font-size: 15px; margin: 4px 0 10px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    height: var(--row); line-height: calc(var(--row) - 2px);
    padding: 0 14px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid var(--aa-blue);
    background: var(--aa-blue);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: var(--aa-blue-l); border-color: var(--aa-blue-l); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--aa-blue); }
.btn.ghost:hover { background: #eef4fc; }
.btn.mini { height: 22px; line-height: 20px; padding: 0 9px; font-size: 12px; }
.btn.danger { background: #fff; color: var(--aa-warn); border-color: #e3b7a6; }
.btn.danger:hover { background: #fdf2ee; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 表格 ---------- */
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
    height: var(--row); text-align: left; font-weight: 500;
    color: var(--aa-sub); background: #f5f9fe;
    border-bottom: 1px solid var(--aa-line);
    padding: 0 8px; white-space: nowrap;
}
table.grid td {
    height: var(--row); border-bottom: 1px solid #edf2f9;
    padding: 0 8px; white-space: nowrap;
}
table.grid tr:last-child td { border-bottom: none; }
table.grid tr:hover td { background: #f8fbff; }
.mono { font-family: Consolas, "Courier New", monospace; }

/* ---------- 状态徽标 ---------- */
.tag { display: inline-block; height: 20px; line-height: 18px; padding: 0 7px; border-radius: 3px; font-size: 12px; border: 1px solid; }
.tag.s0 { color: #8a6d1f; border-color: #e6d5a2; background: #fdf8e8; }
.tag.s1 { color: var(--aa-ok); border-color: #a9d8bf; background: #eefaf3; }
.tag.s2 { color: var(--aa-sub); border-color: var(--aa-line); background: #f4f7fb; }
.tag.s3 { color: #8a8f96; border-color: #dcdfe3; background: #f6f7f8; }

/* ---------- 支付页 ---------- */
.amount {
    font-size: 30px; font-weight: 500; color: var(--aa-warn);
    letter-spacing: .5px; line-height: 1.2;
}
.amount small { font-size: 14px; color: var(--aa-sub); font-weight: 400; }
.paycols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.paybox { border: 1px solid var(--aa-line); border-radius: 6px; padding: 12px; text-align: center; background: #fbfdff; }
.paybox h3 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--aa-blue-d); }
.paybox img { width: 200px; height: 200px; object-fit: contain; background: #fff; border: 1px solid var(--aa-line); border-radius: 4px; }
.paybox .ph { width: 200px; height: 200px; margin: 0 auto; border: 1px dashed var(--aa-line); border-radius: 4px; color: var(--aa-sub); font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; }

.notice { border-left: 3px solid var(--aa-blue); background: #f3f8ff; padding: 9px 12px; font-size: 13px; color: #2c4562; border-radius: 0 4px 4px 0; }
.notice.warn { border-left-color: var(--aa-warn); background: #fdf5f2; color: #6b3418; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 2px 0; font-size: 13px; }
.kv .k { color: var(--aa-sub); }
.kv .v { color: var(--aa-text); }

/* ---------- 表单 ---------- */
input[type=text], input[type=password] {
    height: 30px; padding: 0 9px; width: 100%;
    border: 1px solid var(--aa-line); border-radius: 4px;
    font: 13px/1 "Microsoft YaHei", sans-serif; color: var(--aa-text);
    background: #fff;
}
input[type=text]:focus, input[type=password]:focus { outline: none; border-color: var(--aa-blue-l); }
label { font-size: 13px; color: var(--aa-sub); display: block; margin: 10px 0 4px; }
.err { color: var(--aa-warn); font-size: 13px; margin: 8px 0 0; }
.hint { color: var(--aa-sub); font-size: 12px; }
.center-narrow { max-width: 380px; margin: 60px auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { height: var(--row); line-height: calc(var(--row) - 2px); padding: 0 12px; font-size: 13px; border: 1px solid var(--aa-line); border-radius: 4px; background: #fff; color: var(--aa-sub); }
.tabs a.on { background: var(--aa-blue); border-color: var(--aa-blue); color: #fff; }
.stat { display: flex; gap: 20px; font-size: 13px; color: var(--aa-sub); }
.stat b { color: var(--aa-blue-d); font-weight: 500; font-size: 15px; }

@media (max-width: 720px) {
    .goods { grid-template-columns: repeat(2, 1fr); }
    .paycols { grid-template-columns: 1fr; }
}

/* ============================================================
   窄屏（手机）：表格变卡片
   列太多，手机上横着拖根本看不全，所以 <=760px 直接把每一行折
   成一张卡：字段名在左，值在右，值允许换行。
   中间宽度（平板）仍有 .table-wrap 横向滚动兜底。
   ============================================================ */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 760px) {
    .wrap { padding: 12px 10px 40px; }

    table.grid.responsive { display: block; }
    table.grid.responsive thead { display: none; }
    table.grid.responsive tbody { display: block; }

    table.grid.responsive tr {
        display: block;
        border: 1px solid var(--aa-line);
        border-radius: 6px;
        margin: 10px;
        padding: 6px 0;
        background: #fff;
    }
    table.grid.responsive tr:hover td { background: transparent; }

    table.grid.responsive td {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        height: auto;
        line-height: 22px;
        padding: 3px 10px;
        border: none;
        white-space: normal;
        word-break: break-all;
    }
    table.grid.responsive td::before {
        content: attr(data-label);
        flex: 0 0 60px;
        color: var(--aa-sub);
        font-size: 12px;
        line-height: 22px;
    }

    /* 操作列：整行铺开，按钮放大到手指点得准 */
    table.grid.responsive td.act {
        display: block;
        padding: 8px 10px 4px;
        margin-top: 4px;
        border-top: 1px dashed var(--aa-line);
    }
    table.grid.responsive td.act::before { content: none; }
    table.grid.responsive td.act form { display: flex; gap: 8px; align-items: center; }
    table.grid.responsive td.act form + form { margin-top: 8px; }
    table.grid.responsive td.act input[type=text] {
        flex: 1; width: auto !important; height: 32px !important; font-size: 13px !important;
    }
    table.grid.responsive td.act .btn,
    table.grid.responsive td.act .btn.mini {
        height: 32px; line-height: 30px; padding: 0 16px; font-size: 13px;
    }

    .tabs { flex-wrap: wrap; }
    .stat { gap: 12px; flex-wrap: wrap; }
    .goods { grid-template-columns: repeat(2, 1fr); }
    .paybox img, .paybox .ph { width: 168px; height: 168px; }
}
