/* Index 目录小页通用样式（turnout/selecttrn/dengji/bancerecord 等）
   前缀 md-ip-*；深色 token 与 base.css 一致 */

.md-ip-page {
    min-height: 100vh;
    background: var(--bg-grad);
    background-attachment: fixed;
    color: #e8eaed;
    font-size: 14px;
    padding-bottom: 70px; /* 给全局底栏留位 */
    box-sizing: border-box;
}

/* 顶栏：返回 + 标题 + 右侧链接 */
.md-ip-header {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 12px;
    box-sizing: border-box;
}
.md-ip-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #e8eaed;
    flex: 1;
    text-align: center;
}
.md-ip-back,
.md-ip-right {
    width: 56px;
    font-size: 13px;
    color: #9aa4b2;
    text-decoration: none;
}
.md-ip-back img { width: 20px; height: 20px; vertical-align: middle; }
.md-ip-right { text-align: right; }
.md-ip-right a { color: #9aa4b2; text-decoration: none; }

/* 卡片容器（与 dengji/selecttrn 旧页 reg-card 一致） */
.md-ip-card {
    margin: 12px 16px 0;
    padding: 16px 20px;
    background: rgba(30, 36, 46, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.md-ip-card-title {
    margin: 0 0 14px;
    padding-left: 10px;
    font-size: 14px;
    color: #9aa4b2;
    border-left: 3px solid #3b82f6;
}

/* 栅格项（2/3 列由 md-ip-grid-2 / md-ip-grid-3 控制） */
.md-ip-grid { display: flex; flex-wrap: wrap; }
.md-ip-grid .md-ip-item {
    box-sizing: border-box;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
}
.md-ip-grid-2 .md-ip-item { width: 50%; }
.md-ip-grid-3 .md-ip-item { width: 33.33%; }
.md-ip-item img { width: 52px; height: 52px; display: inline-block; }
.md-ip-item p { margin: 8px 0 0; font-size: 13px; color: #e8eaed; }

/* 表单行（turnout） */
.md-ip-field { margin: 12px 16px 0; }
.md-ip-field p { margin: 0 0 8px; color: #9aa4b2; font-size: 13px; }
.md-ip-field input {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: #e8eaed;
    font-size: 14px;
    outline: none;
}
.md-ip-btns { margin: 20px 16px 0; }
.md-ip-btn {
    display: block;
    width: 100%;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}
.md-ip-btn-disabled { opacity: .6; }
.md-ip-btn-plain {
    margin-top: 12px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

/* 记录表格（bancerecord 四列） */
.md-ip-table { margin: 12px 16px 0; }
.md-ip-tr {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}
.md-ip-tr.md-ip-th { color: #9aa4b2; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.md-ip-td { flex: 1; text-align: center; word-break: break-all; padding: 0 2px; }
/* 时间列：数字不能从中间断开（word-break:normal 只允许在空格处折行），
   字号压到 11px 保证「日期 / 时分秒」两行放得下，不溢出也不裁切 */
.md-ip-td.md-ip-time { font-size: 11px; line-height: 1.4; color: #9aa4b2; word-break: normal; }
.md-ip-amt-out { color: #f0876a; }
.md-ip-amt-in { color: #4cc38a; }
.md-ip-empty {
    padding: 40px 0;
    text-align: center;
    color: #9aa4b2;
    font-size: 13px;
}

/* 数权分配结果（jifenmny）：汇总文本 + 明细列宽（序窄/账户宽/分得绿色） */
.md-ip-fpsum p { margin: 6px 0; font-size: 13px; color: #9aa4b2; }
.md-ip-fpsum p b { color: #e8eaed; font-weight: 600; }
.md-ip-td.md-ip-fp1 { flex: 0 0 36px; }
.md-ip-td.md-ip-fp2 { flex: 2; }
.md-ip-td.md-ip-fp4 { color: #4cc38a; font-weight: 600; }

/* 分配权转让（ttturnout）支付确认弹层金额 */
.md-ip-ttamt { margin: 0 0 12px; font-size: 18px; font-weight: 600; color: #fff; text-align: center; }

/* ---------- 批次4：审批流（jd 步骤条 + zttable 审批表格） ---------- */

/* jd 两步进度条（对齐旧 jquery.step：序号圆点 + 标题 + 进度线） */
.md-ip-steps {
    position: relative;
    display: flex;
    margin: 16px 16px 12px;
}
.md-ip-steps-line {
    position: absolute;
    left: 25%;
    right: 25%;
    top: 17px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.md-ip-steps-line i {
    display: block;
    height: 100%;
    background: #3b82f6;
    transition: width .4s;
}
.md-ip-step {
    flex: 1;
    text-align: center;
    cursor: pointer;
}
.md-ip-step span {
    display: inline-block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #9aa4b2;
    font-size: 15px;
    position: relative;
    z-index: 1;
}
.md-ip-step.on span { background: #3b82f6; color: #fff; }
.md-ip-step p { margin: 6px 0 0; font-size: 13px; color: #9aa4b2; }
.md-ip-step.on p { color: #e8eaed; }

/* jd 外部表单 iframe（旧页 iframe 固定 top:56px 高 90%） */
.md-ip-iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 160px);
    border: none;
    background: #fff;
}

/* 审批表格（对齐旧 reponsetable 深色覆盖） */
.md-ip-tablewrap {
    margin: 12px 12px 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(30, 36, 46, 0.88);
}
.md-ip-zttable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
}
.md-ip-zttable th,
.md-ip-zttable td {
    padding: 9px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #e8eaed;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.md-ip-zttable thead th {
    background: rgba(20, 27, 38, 0.98);
    color: #9aa4b2;
}
.md-ip-zttable tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
.md-ip-ztdel { color: #f0876a; text-decoration: none; }

/* ---------- 批次5：down 兑换弹窗（对齐旧 layer 模态） ---------- */
.md-ip-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}
.md-ip-dialog {
    width: 100%;
    max-width: 340px;
    background: #2a3240;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 16px;
    box-sizing: border-box;
}
.md-ip-dialog h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: #e8eaed;
    word-break: break-all;
}
.md-ip-dialog-notice {
    width: 100%;
    min-height: 64px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(20, 27, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f0b26a;
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    box-sizing: border-box;
}
.md-ip-dialog-input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(20, 27, 38, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #e8eaed;
    font-size: 13px;
    word-break: break-all;
    box-sizing: border-box;
}
.md-ip-dialog-btns .md-ip-btn { margin: 0 0 10px; }
