/*
 * redeem.css — Redeem terminal. Header strip (back/machine/grade/balance) +
 * a horizontally-scrolling milestone strip + a 2-column bank-form/history
 * split at the bottom. Same tan-panel/flat-nested-box conventions as the
 * rest of NEW_UI — the original's absolute-positioned rotated-diamond
 * canvas track is replaced by plain flex cards (see redeem.js header comment).
 */

.rd-main {
    position: relative; z-index: 2; flex: 1;
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px 20px; min-height: 0; overflow-y: auto; scrollbar-width: none;
}
.rd-main::-webkit-scrollbar { display: none; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.rd-header { display: flex; align-items: center; gap: 16px; padding: 14px 18px; flex-shrink: 0; }
.rd-header-info { flex: 1; min-width: 0; }
.rd-machine-name { font-size: 16px; font-weight: 800; color: #2c1a08; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-machine-meta { font-size: 12.5px; color: #8a6a48; margin-top: 2px; }
.rd-grade-chip { flex-shrink: 0; }
.rd-tier-pill { text-align: center; padding: 6px 16px; border-radius: 8px; border: 1px solid; font-size: 13px; }
.rd-balance-box { text-align: right; flex-shrink: 0; }
.rd-balance-lbl { font-size: 10.5px; letter-spacing: 1.5px; color: #8a6a48; margin-bottom: 4px; }
.rd-balance-val { font-size: 22px; font-weight: 800; font-family: var(--font-mono); color: #9c7a00; }

/* ── Milestone track ─────────────────────────────────────────────────────── */

.rd-track-panel { padding: 14px 16px 16px; flex-shrink: 0; }
.rd-track-head { font-size: 12.5px; letter-spacing: 2px; color: #8a6a48; font-weight: 700; margin-bottom: 12px; }
.rd-track-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }

.rd-ms-node {
    flex: 0 0 auto; width: 128px; text-align: center; border-radius: 10px;
    background: rgba(58,36,16,.05); border: 1.5px solid rgba(58,36,16,.15);
    padding: 14px 8px;
}
.rd-ms-node.available { cursor: pointer; transition: transform .15s; }
.rd-ms-node.available:hover { transform: translateY(-3px); }
.rd-ms-node.locked { opacity: .5; }
.rd-ms-badge {
    width: 26px; height: 26px; margin: 0 auto 8px; border-radius: 50%; border: 1.5px solid;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px;
}
.rd-ms-qty { font-size: 16px; font-weight: 800; font-family: var(--font-mono); }
.rd-ms-unit { font-size: 10.5px; color: #8a6a48; margin-bottom: 8px; }
.rd-ms-idr { font-size: 12px; font-weight: 700; font-family: var(--font-mono); }
.rd-ms-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; margin-top: 6px; }
.rd-ms-tag.done { color: #2b8a3e; opacity: .7; }
.rd-ms-tag.locked { color: #8a6a48; }

/* ── Bottom: form + history ─────────────────────────────────────────────── */

.rd-bottom { display: flex; gap: 14px; flex: 1; min-height: 320px; }
.rd-form-panel { flex: 0 0 340px; display: flex; flex-direction: column; padding: 16px 18px; }
.rd-history-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 16px 18px; }

.rd-selected-box { background: rgba(156,122,0,.08); border: 1px solid rgba(156,122,0,.3); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.rd-sel-label { font-size: 14px; font-weight: 800; color: #9c7a00; }
.rd-sel-idr { font-size: 12.5px; color: #8a6a48; margin-top: 3px; }
.rd-form-info { font-size: 12.5px; color: #8a6a48; margin-bottom: 14px; line-height: 1.6; }

.rd-field { margin-bottom: 10px; }
.rd-field-lbl { font-size: 10.5px; letter-spacing: 1.5px; color: #8a6a48; margin-bottom: 5px; font-weight: 700; }

#rd-submit { margin-top: auto; }

.rd-hist-row {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
    border: 1px solid; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px;
}
.rd-hist-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #2c1a08; }
.rd-hist-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.rd-hist-meta { font-size: 11.5px; color: #8a6a48; margin-top: 3px; }
.rd-hist-idr { font-size: 13px; font-weight: 800; font-family: var(--font-mono); color: #2b8a3e; }
.rd-hist-status { font-size: 10.5px; letter-spacing: 1px; font-weight: 700; margin-top: 3px; }

@container (max-width: 800px) {
    .rd-header { flex-wrap: wrap; }
    .rd-bottom { flex-direction: column; }
    .rd-form-panel { flex: 1 1 auto; }
}
