/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #f5f5f5;
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 12px;
    background-color: #f5f5f5;
    position: relative;
    top: 0;
    z-index: 100;
    box-shadow: none;
    border-bottom: none;
    margin-bottom: 0;
}

.back-button, .search-button, .more-button {
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* 返回箭头特别样式 */
.back-button {
    margin-left: 5px;
    z-index: 1;
    position: relative;
}

.back-button svg {
    width: 48px;
    height: 48px;
    stroke-width: 2px;
}

.title {
    flex-grow: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.5px;
    /* 复刻原图字体特性 */
    font-family: "PingFang SC", "Microsoft Yahei", sans-serif;
    /* 确保真正居中 */
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    /* 调整字体与代理付款对齐 */
    font-size: 16px;
}

.actions {
    /* 保持右侧图标在右侧 */
    z-index: 1;
    position: relative;
    display: flex;
    align-items: center;
    margin-right: -7px; /* 从-10px改为-20px，再向左移动10px */
}

/* 搜索图标使用圆形背景 */
.search-button {
    background-color: #f5f5f5;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin-right: 5px;
}

.more-button {
    margin-right: 5px;
    width: 40px;
    height: 40px;
}

/* 图标大小调整 */
.search-button svg {
    width: 26px;
    height: 26px;
    stroke-width: 2px;
}

.more-button svg {
    width: 28px;
    height: 28px;
}

/* 交易卡片样式 */
.transaction-card {
    margin: 0 15px 20px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.transaction-type {
    padding: 20px 20px 15px;
    text-align: center;
    font-size: 16px;
    color: #333;
}

.transaction-amount {
    padding: 0 20px 10px;
    text-align: center;
    font-size: 23px;
    font-weight: bold;
    color: #333;
}

.transaction-details {
    /* 移除分隔线 */
    border-top: none;
    padding-top: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    /* 移除分隔线 */
    border-bottom: none;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #888;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-size: 14px;
    text-align: right;
    max-width: 65%;
    word-break: break-all;
    font-weight: 510;
}

/* 编辑按钮样式 */
.edit-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.edit-button:hover {
    background-color: #0062cc;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.submit-button {
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
}

.submit-button:hover {
    background-color: #0062cc;
}

/* 自适应样式 */
@media (max-width: 400px) {
    .transaction-amount {
        font-size: 28px;
    }
    
    .detail-label, .detail-value {
        font-size: 13px;
    }
}

@media (min-width: 768px) {
    .modal-content {
        margin: 5% auto;
    }
}

/* ==========================================================================
   迭代需求【新增/改动】样式：严格参照手机截图 1:1 复刻明细详情页布局
   （覆盖规则放在原样式之后，不删除任何原有样式）
   ========================================================================== */

/* 正常手机系统字体栈（迭代需求：字体改为手机系统默认字体） */
.font-system {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
}

/* 页面底色与容器宽度：按 480px 手机屏复刻 */
body {
    background-color: #f6f6f6;
}
.container {
    max-width: 480px;
    background-color: #f6f6f6;
}

/* ---- 顶部导航栏：加高为 89px，标题 20px，图标靠两端 ---- */
.header {
    height: 89px;
    background-color: #f6f6f6;
    padding: 0;
}
.back-button {
    margin-left: 24px;
    width: 24px;
    height: 36px;
    color: #111;
}
.back-button svg {
    width: 24px;
    height: 24px;
}
.title {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #111;
    letter-spacing: 1px;
}
.actions {
    margin-right: 15px;
}
.search-button {
    background-color: transparent;
    border-radius: 0;
    width: 31px;
    height: 36px;
    margin-right: 23px;
    color: #111;
}
.search-button svg {
    width: 24px;
    height: 24px;
}
.more-button {
    width: 29px;
    height: 36px;
    margin-right: 0;
    color: #111;
}
.more-button svg {
    width: 24px;
    height: 24px;
}

/* ---- 交易详情卡片：白色圆角卡片，间距严格按截图 ---- */
.transaction-card {
    margin: 0 15px;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.transaction-type {
    padding: 52px 20px 0;
    text-align: center;
    font-size: 15px;
    color: #262626;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    line-height: 1;
}
.transaction-amount {
    margin-top: 33px;
    padding: 0 20px;
    text-align: center;
    font-size: 27px;
    font-weight: 400;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    line-height: 1;
}
.transaction-details {
    border-top: none;
    /* 迭代需求【改动】缩短"其他款项/金额"到"交易账户"之间的间距 */
    padding: 30px 0 17px;
}
.detail-item {
    padding: 16px 19px;
    line-height: 1;
}
.detail-label {
    color: #b8b8b8;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    line-height: 1;
}
.detail-value {
    color: #111;
    font-size: 14px;
    text-align: right;
    max-width: 68%;
    word-break: break-all;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    line-height: 1;
}

/* ---- 对方账户行：内容过长时不跳行（不换行），自动向左延伸占据更多空间 ----
   迭代需求【改动】：标签固定不压缩，值按内容宽度右对齐，超宽时向左溢出移动 */
#oppositeRow {
    align-items: center;
}
#oppositeRow .detail-label {
    flex-shrink: 0;
    flex-grow: 0;
}
#oppositeAccountValue {
    white-space: nowrap;
    word-break: normal;
    max-width: none;
    flex: 0 0 auto;
    min-width: 0;
    overflow: visible;
}

/* ---- 备注卡片（独立白色卡片）---- */
.note-card {
    margin: 28px 15px 0;
    background-color: #fff;
    border-radius: 12px;
    padding: 12px 0 27px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.note-title {
    padding: 0 18px;
    font-size: 14px;
    color: #b8b8b8;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    line-height: 1;
}
.note-input {
    display: block;
    width: calc(100% - 32px);
    /* 迭代需求【改动】缩短第一个输入框（备注）与标题之间的空白间距 */
    margin: 12px 16px 0;
    padding: 0 0 12px;
    border: none;
    border-bottom: 1px solid #bbbbbb;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    color: #333;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    outline: none;
}
.note-input::placeholder {
    color: #707070;
}

/* ---- 实时预览表单面板 ---- */
.form-panel {
    margin: 15px;
    background-color: #fff;
    border-radius: 12px;
    padding: 16px 16px 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}
.form-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.form-row label {
    width: 96px;
    flex-shrink: 0;
    font-size: 12px;
    color: #888;
}
.form-row input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
    background-color: #fff;
}
.form-row input:focus {
    outline: none;
    border-color: #1677ff;
}
