/* ==========================================================================
   校园服务平台 —— 全站样式
   深色主题 + 金色强调色（#d4b468），与原有视觉风格保持一致
   ========================================================================== */

:root {
    --bg:        #14161c;
    --panel:     #202229;
    --panel-2:   #1a1c23;
    --line:      #2a2c34;
    --line-soft: #272930;
    --text:      #e8e8e8;
    --text-dim:  #999999;
    --text-mute: #bbbbbb;
    --gold:      #d4b468;
    --gold-lit:  #e3c67e;
    --danger:    #e06c6c;
    --ok:        #6cbf8b;
    --radius:    12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- 顶栏 --- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background-color: rgba(20, 22, 28, 0.92);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.logo {
    font-size: 28px;
    color: var(--gold);
    font-weight: bold;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 34px;
}

.nav a {
    color: var(--text-mute);
    text-decoration: none;
    font-size: 16px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color .18s, border-color .18s;
}

.nav a:hover {
    color: var(--gold);
}

.nav a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-right a {
    color: var(--text-mute);
    text-decoration: none;
    font-size: 15px;
    transition: color .18s;
}

.header-right a:hover {
    color: var(--gold);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-mute);
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transition: color .18s;
}

.logout-btn:hover {
    color: var(--gold);
}

/* 顶栏未读消息小角标 */
.nav-badge {
    display: inline-block;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    margin-left: 3px;
    border-radius: 999px;
    background-color: var(--danger);
    color: #fff;
    font-size: 11px;
    line-height: 17px;
    text-align: center;
    font-weight: bold;
    vertical-align: 1px;
}

.page-content {
    padding: 34px 40px 60px;
}

/* ------------------------------------------------------------ 通用组件 --- */
.panel {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    font-weight: bold;
    font-size: 16px;
}

.page-title {
    color: var(--gold);
    font-size: 28px;
    margin-bottom: 6px;
}

.page-sub {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 26px;
}

.btn {
    display: inline-block;
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .18s, color .18s, border-color .18s;
}

.btn-primary {
    background-color: var(--gold);
    color: #14161c;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: var(--gold-lit);
}

.btn-ghost {
    background: none;
    border: 1px solid #3a3d45;
    color: var(--text-mute);
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 14px;
}

.btn:disabled,
.btn.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.empty-box {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 52px 30px;
    text-align: center;
    color: var(--text-dim);
    line-height: 2;
}

.empty-box a {
    color: var(--gold);
    text-decoration: none;
}

.empty-box .big {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

/* --------------------------------------------------------- 美食/点餐页 --- */
.order-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 26px;
    align-items: start;
}

.cat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.cat-chip {
    display: inline-block;
    padding: 7px 18px;
    border: 1px solid #3a3d45;
    border-radius: 999px;
    color: var(--text-mute);
    text-decoration: none;
    font-size: 14px;
    transition: all .18s;
}

.cat-chip:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.cat-chip.active {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #14161c;
    font-weight: bold;
}

.cat-chip .count {
    opacity: .7;
    font-size: 12px;
    margin-left: 4px;
}

.food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 16px;
}

.food-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 20px 16px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}

.food-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.food-emoji {
    font-size: 40px;
    line-height: 1;
}

.food-name {
    margin-top: 12px;
    font-size: 15px;
    font-weight: bold;
    color: var(--text);
    min-height: 22px;
}

.food-desc {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    min-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.food-price {
    margin-top: 12px;
    color: var(--danger);
    font-weight: bold;
    font-size: 18px;
}

.food-price .unit {
    font-size: 13px;
}

.buy-form {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.qty-input {
    width: 52px;
    padding: 7px 8px;
    background-color: var(--bg);
    border: 1px solid #3a3d45;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    text-align: center;
    font-family: inherit;
}

.qty-input:focus {
    outline: none;
    border-color: var(--gold);
}

.buy-form .btn {
    flex: 1;
    padding: 7px 10px;
    font-size: 14px;
}

/* 侧栏 */
.side-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 96px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #d8d8d8;
    padding: 5px 0;
}

.cart-row .qty {
    color: var(--text-dim);
    font-size: 13px;
}

.cart-group {
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.cart-group:last-child {
    border-bottom: none;
}

.cart-group-head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding: 14px 20px 0;
    font-size: 16px;
}

.cart-total .money {
    color: var(--danger);
    font-weight: bold;
    font-size: 22px;
}

.panel-body {
    padding: 14px 20px 18px;
}

.hall-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hall-card {
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px 10px;
    text-align: center;
    background-color: var(--panel-2);
}

.hall-card .icon {
    font-size: 26px;
}

.hall-card .name {
    margin: 8px 0 6px;
    font-size: 14px;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.badge-open {
    background-color: rgba(108, 191, 139, .16);
    color: var(--ok);
}

.badge-soon {
    background-color: rgba(212, 180, 104, .16);
    color: var(--gold);
}

/* ------------------------------------------------------------ 订单页 --- */
.alert {
    border-radius: 10px;
    padding: 13px 18px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.alert-warn {
    background-color: rgba(212, 180, 104, .1);
    border: 1px solid rgba(212, 180, 104, .35);
    color: var(--gold);
}

.alert-err {
    background-color: rgba(224, 108, 108, .1);
    border: 1px solid rgba(224, 108, 108, .35);
    color: var(--danger);
}

.order-wrap {
    max-width: 880px;
    margin: 0 auto;
}

.order-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 18px;
}

.order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.order-no {
    color: var(--gold);
    font-weight: bold;
}

.order-time {
    color: var(--text-dim);
    font-size: 13px;
}

.order-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    color: #dddddd;
    font-size: 15px;
}

.order-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 12px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
    font-size: 17px;
}

.order-total .money {
    color: var(--danger);
    font-weight: bold;
    font-size: 20px;
}

/* ------------------------------------------------------------ 登录页 --- */
.auth-wrap {
    max-width: 410px;
    margin: 56px auto;
}

.auth-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 34px;
}

.auth-title {
    color: var(--gold);
    font-size: 25px;
    margin-bottom: 10px;
    text-align: center;
}

.auth-sub {
    color: var(--text-dim);
    font-size: 14px;
    text-align: center;
    margin-bottom: 24px;
}

.auth-card label {
    display: block;
    color: var(--text-mute);
    margin-bottom: 7px;
    font-size: 14px;
}

.auth-card input {
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 17px;
    background-color: var(--bg);
    border: 1px solid #3a3d45;
    border-radius: 7px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--gold);
}

.auth-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.auth-msg {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.auth-msg ul {
    margin: 0;
    padding-left: 18px;
}

.auth-foot {
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 20px;
}

.auth-foot a {
    color: var(--gold);
    text-decoration: none;
}

.auth-actions {
    text-align: center;
    margin-top: 8px;
}

.auth-actions .btn {
    width: auto;
    margin: 0 5px;
}

/* ==========================================================================
   好物交易市场
   ========================================================================== */

/* 市场页头：标题 + 余额 + 发布按钮 */
.market-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 22px;
}

.market-head-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.balance-pill {
    padding: 8px 16px;
    border: 1px solid rgba(212, 180, 104, .45);
    border-radius: 999px;
    background-color: rgba(212, 180, 104, .09);
    color: var(--text-mute);
    font-size: 14px;
    white-space: nowrap;
}

.balance-pill b {
    color: var(--gold);
    font-size: 16px;
}

/* 搜索栏 */
.market-search {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.market-search-input {
    flex: 1;
    padding: 11px 16px;
    background-color: var(--panel);
    border: 1px solid #3a3d45;
    border-radius: 9px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.market-search-input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-hint {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 16px;
}

.search-hint a {
    color: var(--gold);
    text-decoration: none;
    margin-left: 8px;
}

/* 商品网格 */
.good-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}

.good-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}

.good-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}

.good-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.good-media {
    position: relative;
    height: 160px;
    background: radial-gradient(circle at 35% 30%, #2c2f38, #1b1d24);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.good-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}

.good-card:hover .good-photo {
    transform: scale(1.07);
}

.good-emoji {
    font-size: 58px;
    line-height: 1;
}

.good-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    background-color: var(--danger);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.good-body {
    padding: 14px 16px 10px;
}

.good-title {
    font-size: 15px;
    font-weight: bold;
    line-height: 1.45;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.good-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.good-cat {
    color: var(--text-dim);
    font-size: 12px;
}

.good-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 10px;
}

.good-price {
    color: var(--danger);
    font-weight: bold;
    font-size: 20px;
}

.good-price .unit {
    font-size: 14px;
}

.good-original {
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: line-through;
}

.good-foot {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px 14px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 13px;
}

/* 成色 / 状态标签 */
.cond-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.cond-new    { background-color: rgba(108, 191, 139, .16); color: #6cbf8b; }
.cond-almost { background-color: rgba(212, 180, 104, .16); color: var(--gold); }
.cond-good   { background-color: rgba(120, 160, 220, .16); color: #8fb4e8; }
.cond-fair   { background-color: rgba(150, 150, 150, .16); color: #aaa; }

.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    white-space: nowrap;
}

.status-on_sale   { background-color: rgba(108, 191, 139, .16); color: #6cbf8b; }
.status-sold      { background-color: rgba(150, 150, 150, .16); color: #aaa; }
.status-off       { background-color: rgba(150, 150, 150, .16); color: #888; }
.status-pending   { background-color: rgba(224, 108, 108, .18); color: #e08a8a; }
.status-paid      { background-color: rgba(212, 180, 104, .18); color: var(--gold); }
.status-shipped   { background-color: rgba(120, 160, 220, .18); color: #8fb4e8; }
.status-done      { background-color: rgba(108, 191, 139, .18); color: #6cbf8b; }
.status-cancelled { background-color: rgba(150, 150, 150, .16); color: #888; }

/* ---------------------------------------------------------- 物品详情 --- */
.detail-nav {
    margin-bottom: 18px;
}

.detail-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
}

.detail-nav a:hover {
    color: var(--gold);
}

.detail-layout {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-media {
    height: 400px;
    border-radius: var(--radius);
    border: 1px solid #333;
    background: radial-gradient(circle at 35% 30%, #2c2f38, #1b1d24);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-emoji {
    font-size: 130px;
    line-height: 1;
}

.detail-title {
    font-size: 26px;
    line-height: 1.4;
    margin-bottom: 14px;
}

.detail-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.detail-price-box {
    display: flex;
    align-items: baseline;
    gap: 14px;
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 20px;
}

.detail-price {
    color: var(--danger);
    font-weight: bold;
    font-size: 36px;
}

.detail-price .unit {
    font-size: 20px;
}

.detail-original {
    color: var(--text-dim);
    font-size: 14px;
    text-decoration: line-through;
}

.detail-discount {
    background-color: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 22px;
}

.detail-meta > div {
    display: flex;
    gap: 14px;
    font-size: 14.5px;
}

.detail-meta .k {
    color: var(--text-dim);
    width: 72px;
    flex-shrink: 0;
}

.detail-meta .v {
    color: var(--text);
}

.detail-desc {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-bottom: 24px;
}

.detail-desc-title {
    color: var(--gold);
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
}

.detail-desc p {
    color: #d5d5d5;
    line-height: 1.9;
    font-size: 14.5px;
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.btn-lg {
    padding: 13px 34px;
    font-size: 16px;
}

.owner-note {
    width: 100%;
    color: var(--gold);
    font-size: 14px;
    margin-bottom: 4px;
}

.balance-tip {
    width: 100%;
    color: var(--text-dim);
    font-size: 13.5px;
    margin-top: 6px;
}

.balance-tip b {
    color: var(--gold);
}

.balance-tip .warn {
    color: var(--danger);
}

.balance-tip a {
    color: var(--gold);
    text-decoration: none;
}

.section-title {
    font-size: 17px;
    color: var(--gold);
    margin: 30px 0 16px;
}

.related-section {
    margin-top: 40px;
}

/* ------------------------------------------------------ 我的物品管理 --- */
.manage-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.manage-row {
    display: flex;
    align-items: center;
    gap: 18px;
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 14px 20px;
    transition: border-color .18s;
}

.manage-row:hover {
    border-color: var(--gold);
}

.manage-thumb {
    width: 74px;
    height: 74px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: radial-gradient(circle at 35% 30%, #2c2f38, #1b1d24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.manage-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manage-main {
    flex: 1;
    min-width: 0;
}

.manage-title {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.manage-title:hover {
    color: var(--gold);
}

.manage-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.manage-time {
    color: var(--text-dim);
}

.manage-price {
    text-align: right;
    flex-shrink: 0;
    min-width: 92px;
}

.manage-price .price {
    color: var(--danger);
    font-weight: bold;
    font-size: 19px;
}

.manage-price .orig {
    color: var(--text-dim);
    font-size: 12.5px;
    text-decoration: line-through;
}

.manage-price .views {
    color: var(--text-dim);
    font-size: 12.5px;
    margin-top: 3px;
}

.manage-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* -------------------------------------------------------- 表单页面 --- */
.form-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.form-panel {
    padding: 28px 30px;
}

.field {
    margin-bottom: 20px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field label {
    display: block;
    color: var(--text-mute);
    font-size: 14px;
    margin-bottom: 8px;
}

.field .req {
    color: var(--danger);
}

.field input[type="text"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    background-color: var(--bg);
    border: 1px solid #3a3d45;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.field textarea {
    resize: vertical;
    line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.field input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg);
    border: 1px dashed #3a3d45;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 14px;
    font-family: inherit;
}

.field-hint {
    color: var(--text-dim);
    font-size: 12.5px;
    margin-top: 7px;
}

.current-image {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-dim);
    font-size: 13px;
}

.current-image img {
    max-height: 70px;
    border-radius: 8px;
    border: 1px solid #333;
}

.form-actions {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 6px;
}

/* -------------------------------------------------------- 我的交易 --- */
.trade-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
}

.trade-columns .section-title {
    margin-top: 0;
}

.trade-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.trade-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}

.trade-no {
    color: var(--text-dim);
    font-size: 12.5px;
    font-family: Consolas, monospace;
}

.trade-title a {
    color: var(--text);
    text-decoration: none;
    font-size: 15.5px;
    font-weight: bold;
}

.trade-title a:hover {
    color: var(--gold);
}

.trade-sub {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 6px;
}

.trade-price {
    color: var(--danger);
    font-weight: bold;
    font-size: 19px;
    margin-top: 8px;
}

.trade-foot {
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
}

/* ------------------------------------------------------ 订单详情页 --- */
.order-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.order-detail-no {
    color: var(--text-dim);
    font-size: 13px;
    font-family: Consolas, monospace;
}

/* 进度条 */
.step-bar {
    display: flex;
    align-items: flex-start;
    margin: 26px 0 28px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 62px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #3a3d45;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    background-color: var(--bg);
    transition: all .2s;
}

.step-label {
    font-size: 12.5px;
    color: var(--text-dim);
    white-space: nowrap;
}

.step.done .step-dot {
    border-color: var(--ok);
    background-color: var(--ok);
    color: #14161c;
}

.step.done .step-label,
.step.current .step-label {
    color: var(--ok);
}

.step.current .step-dot {
    border-color: var(--gold);
    background-color: var(--gold);
    color: #14161c;
    box-shadow: 0 0 0 5px rgba(212, 180, 104, .16);
}

.step.current .step-label {
    color: var(--gold);
    font-weight: bold;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #3a3d45;
    margin-top: 15px;
}

.info-table {
    border-top: 1px solid var(--line);
}

.info-row {
    display: flex;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}

.info-row .k {
    color: var(--text-dim);
    width: 84px;
    flex-shrink: 0;
}

.info-row .v {
    color: var(--text);
}

.info-row .v.price {
    color: var(--danger);
    font-weight: bold;
    font-size: 18px;
}

.info-row .v a {
    color: var(--gold);
    text-decoration: none;
}

.order-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.order-actions form {
    margin: 0;
}

.done-note {
    color: var(--ok);
    font-size: 15px;
}

/* ---------------------------------------------------------- 钱包页 --- */
.wallet-cards {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 26px;
}

.wallet-card {
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 20px 22px;
}

.wallet-card.main {
    background: linear-gradient(135deg, rgba(212, 180, 104, .16), rgba(212, 180, 104, .04));
    border-color: rgba(212, 180, 104, .4);
}

.wallet-label {
    color: var(--text-dim);
    font-size: 13.5px;
    margin-bottom: 10px;
}

.wallet-amount {
    color: var(--gold);
    font-weight: bold;
    font-size: 38px;
    line-height: 1.1;
}

.wallet-amount .unit {
    font-size: 22px;
}

.wallet-amount.sm {
    font-size: 22px;
}

.wallet-amount.in  { color: var(--ok); }
.wallet-amount.out { color: var(--danger); }

.recharge-form {
    display: flex;
    gap: 12px;
    max-width: 440px;
}

.recharge-input {
    flex: 1;
    padding: 11px 15px;
    background-color: var(--bg);
    border: 1px solid #3a3d45;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.recharge-input:focus {
    outline: none;
    border-color: var(--gold);
}

.quick-amounts {
    margin-top: 14px;
    color: var(--text-dim);
    font-size: 13.5px;
}

.quick-amounts a {
    color: var(--gold);
    text-decoration: none;
    margin-right: 14px;
    border-bottom: 1px dashed rgba(212, 180, 104, .5);
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.log-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: normal;
    font-size: 13px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.log-table td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.log-table tbody tr:last-child td {
    border-bottom: none;
}

.log-table .right { text-align: right; }
.log-table .dim   { color: var(--text-dim); font-size: 13px; }
.log-table .in    { color: var(--ok); font-weight: bold; }
.log-table .out   { color: var(--danger); font-weight: bold; }

.gold { color: var(--gold); }

/* ---------------------------------------------------------- 聊天页 --- */
.chat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 14px 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color .18s, background-color .18s;
}

.chat-row:hover {
    border-color: var(--gold);
    background-color: #232630;
}

.chat-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: radial-gradient(circle at 35% 30%, #2c2f38, #1b1d24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-main {
    flex: 1;
    min-width: 0;
}

.chat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.chat-peer {
    font-size: 15.5px;
    font-weight: bold;
}

.chat-role {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 9px;
    border-radius: 999px;
    background-color: rgba(212, 180, 104, .16);
    color: var(--gold);
    font-size: 11.5px;
    font-weight: normal;
}

.chat-time {
    color: var(--text-dim);
    font-size: 12.5px;
    flex-shrink: 0;
}

.chat-good {
    color: var(--gold);
    font-size: 12.5px;
    margin-top: 5px;
}

.chat-last {
    color: var(--text-dim);
    font-size: 13.5px;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-unread {
    flex-shrink: 0;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background-color: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 会话详情：淘宝式气泡 */
.chat-wrap {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 190px);
    min-height: 460px;
    background-color: var(--panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background-color: var(--panel-2);
}

.chat-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
}

.chat-back:hover {
    color: var(--gold);
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-peer {
    font-size: 15.5px;
    font-weight: bold;
}

.chat-header-good {
    display: block;
    color: var(--text-dim);
    font-size: 12.5px;
    text-decoration: none;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header-good:hover {
    color: var(--gold);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-empty {
    color: var(--text-dim);
    text-align: center;
    margin: auto;
    font-size: 14px;
}

.bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.bubble-row.mine {
    justify-content: flex-end;
}

.bubble-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #3a3d45;
    color: var(--text-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.bubble-avatar.me {
    background-color: var(--gold);
    color: #14161c;
}

.bubble {
    max-width: 68%;
    padding: 11px 15px;
    border-radius: 14px;
    background-color: #2a2d36;
    border: 1px solid #34373f;
}

.bubble-row.mine .bubble {
    background-color: rgba(212, 180, 104, .16);
    border-color: rgba(212, 180, 104, .4);
}

.bubble-text {
    font-size: 14.5px;
    line-height: 1.65;
    word-break: break-word;
}

.bubble-time {
    color: var(--text-dim);
    font-size: 11.5px;
    margin-top: 6px;
    text-align: right;
}

.chat-input-bar {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background-color: var(--panel-2);
}

.chat-input {
    flex: 1;
    padding: 11px 16px;
    background-color: var(--bg);
    border: 1px solid #3a3d45;
    border-radius: 999px;
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* ------------------------------------------------------------ 响应式 --- */
@media (max-width: 1100px) {
    .order-layout {
        grid-template-columns: 1fr;
    }
    .side-col {
        position: static;
    }
    .detail-layout {
        grid-template-columns: 1fr;
    }
    .detail-media {
        height: 300px;
    }
    .trade-columns {
        grid-template-columns: 1fr;
    }
    .wallet-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 20px;
    }
    .nav {
        gap: 18px;
        flex-wrap: wrap;
    }
    .page-content {
        padding: 24px 18px 48px;
    }
    .market-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .field-row {
        grid-template-columns: 1fr;
    }
    .manage-row {
        flex-wrap: wrap;
    }
    .log-table th:nth-child(5),
    .log-table td:nth-child(5) {
        display: none;
    }
}
