/* CDK administration and standalone customer redemption surface. */
.rd-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.rd-summary article { min-width: 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rd-summary article > span { display: block; color: var(--muted); font-size: 10px; }
.rd-summary strong { display: block; margin-top: 8px; font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rd-table { min-width: 700px; }
.rd-table th:first-child, .rd-table td:first-child { padding-left: 22px; }
.rd-table small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; white-space: normal; }
.rd-table .task-progress { margin-top: 9px; max-width: 150px; }
.rd-code { display: block; font-size: 11px; color: #846a38; max-width: 340px; white-space: normal; overflow-wrap: anywhere; }
.rd-row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-plan-line { font-size: 11px; line-height: 1.9; white-space: normal; }
.rd-plan-line b { color: #9c8251; font-size: 10px; font-weight: 500; }
.rd-pagination > div { display: flex; gap: 8px; }
.rd-inline-status { padding: 0 22px 15px; color: var(--accent); font-size: 11px; line-height: 1.8; }
.rd-inline-status:empty { display: none; }
.stock-breakdown { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; padding: 0 22px 22px; }
.stock-breakdown > div { border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: #faf8f2; }
.stock-breakdown span { display: block; font-size: 10px; color: var(--muted); }
.stock-breakdown strong { display: block; margin-top: 8px; font-size: 20px; font-weight: 550; }
.stock-breakdown small { font-size: 9px; color: var(--muted); font-weight: 400; }
#generate-codes-dialog { width: 580px; }
#generated-codes-dialog { width: 580px; }
#generated-codes-output { font-size: 11px; min-height: 200px; line-height: 1.8; }
.rd-plan-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 10px; font-size: 12px; }
.rd-plan-item { display: grid; grid-template-columns: minmax(0,1fr) 65px 30px; align-items: center; gap: 9px; margin-bottom: 10px; }
.rd-plan-item select, .rd-plan-item input { margin: 0 !important; min-width: 0; }
.rd-plan-total { font-size: 11px; text-align: right; color: var(--accent); margin: 12px 0 18px; }
#redemption-order-dialog { width: 940px; }
#redemption-order-dialog > .dialog-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-top: 8px; }
body:has(dialog[open]) .skip-link { display: none; }
.rd-detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rd-detail-hero code { color: var(--accent); font-size: 14px; }
.rd-detail-hero h3 { margin: 9px 0 5px; }
.rd-detail-hero small { color: var(--muted); font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.rd-detail-plan { margin: 10px 0 18px; padding: 12px 16px; background: #f7f2e7; border-radius: 7px; }
.rd-result-cell { max-width: 300px; min-width: 190px; white-space: normal; overflow-wrap: anywhere; font-size: 10px; line-height: 1.7; }
.rd-result-cell details { margin-top: 8px; }
.rd-result-cell pre { max-width: 260px; max-height: 200px; overflow: auto; white-space: pre-wrap; background: #f5f3ed; padding: 10px; }
.rd-audit { margin: 18px 0; font-size: 11px; }
.rd-audit summary { cursor: pointer; color: var(--accent); }
.rd-operation-note { display: block; margin-top: 18px; font-size: 11px; }
.rd-operation-note textarea { font-size: 11px; min-height: 65px; }
.rd-actions { flex-wrap: wrap; }
.rd-actions button { font-size: 10px; }
.redeem-entry { font-size: 10px; }
body:not(.redeem-page) .sidebar { padding-top: 25px; }
body:not(.redeem-page) .brand { margin-bottom: 26px; }
body:not(.redeem-page) .nav-section-label { margin-top: 17px; }
body:not(.redeem-page) .sidebar-ornament { padding-top: 25px; padding-bottom: 18px; }
body:not(.redeem-page) .sidebar-ornament::before, body:not(.redeem-page) .sidebar-ornament::after { top: 35px; }

/* Customer page: a calm, ivory card against a constellation-inspired canvas. */
.redeem-page { background: radial-gradient(ellipse at 12% 48%,#e4e8e480,transparent 45%),#f4f2ec; min-height: 100vh; }
.redeem-header { height: 90px; max-width: 1200px; margin: auto; padding: 0 42px; background: transparent; border-bottom: 1px solid #dcd6c6; }
.redeem-brand { display: flex; align-items: center; gap: 12px; }
.redeem-brand > span { color: #b29155; font-size: 38px; }
.redeem-brand b { color: var(--navy); font-size: 23px; letter-spacing: 3px; }
.redeem-brand small { display: block; font-size: 8px; font-weight: 400; letter-spacing: 1.8px; color: #9b875f; margin-top: 2px; }
.redeem-main { display: grid; grid-template-columns: 1fr 480px; gap: 85px; align-items: start; max-width: 1120px; min-height: 0; padding: 64px 36px 40px; margin: auto; }
.redeem-intro { padding-top: 30px; }
.redeem-intro h1 { font-size: 35px; font-weight: 600; line-height: 1.7; letter-spacing: 1.5px; margin: 15px 0; }
.redeem-intro h1 > span { margin-left: 15px; color: #b8a16c; font-size: 23px; }
.redeem-intro > p { color: var(--muted); font-size: 12px; line-height: 2.2; }
.redeem-emblem { position: relative; display: grid; place-items: center; gap: 20px; width: 230px; height: 245px; margin: 28px auto 18px; color: #a28c5c; }
.redeem-emblem::before, .redeem-emblem::after { position: absolute; content: ""; width: 150px; height: 150px; border: 1px solid #c6b68d80; transform: rotate(45deg); top: 22px; border-radius: 2px; }
.redeem-emblem::after { width: 183px; height: 183px; top: 6px; border-color: #c6b68d40; transform: rotate(0); border-radius: 50%; }
.redeem-emblem > div { margin-top: 15px; font-size: 82px; font-weight: 300; color: #b39d69; line-height: 1; }
.redeem-emblem > span { margin-top: 14px; font-size: 8px; letter-spacing: 2.3px; }
.redeem-trust { display: flex; justify-content: space-between; gap: 8px; padding-top: 20px; margin-bottom: 16px; border-top: 1px solid #ded7c8; font-size: 10px; color: #84724e; }
.redeem-intro .redeem-footnote { font-size: 9px; line-height: 2; color: #999a90; }
.redeem-card { padding: 31px; background: var(--surface); border: 1px solid #e3dac5; border-radius: 15px; box-shadow: 0 12px 50px #38425406; }
.redeem-steps { display: flex; justify-content: space-between; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.redeem-steps li { display: flex; align-items: center; gap: 6px; color: #a3a7aa; font-size: 10px; white-space: nowrap; }
.redeem-steps b { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #f2f1ec; color: #9a9e9e; font-size: 9px; font-weight: 500; }
.redeem-steps li.active { color: #8d713c; }
.redeem-steps li.active b { background: #eee1c3; color: #8d713c; }
.redeem-card h2 { font-size: 21px; margin-bottom: 10px; }
.redeem-help { font-size: 11px; color: var(--muted); line-height: 1.9; margin-bottom: 21px; }
.redeem-wide { width: 100%; min-height: 42px !important; margin-top: 6px; }
#redeem-code { letter-spacing: 1px; font-family: "Segoe UI",monospace; }
.redeem-message { border: 1px solid #e6d9bf; background: #faf4e7; padding: 12px 14px; border-radius: 7px; margin-bottom: 18px; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.redeem-code-summary { padding: 17px; border: 1px solid #e8dcc1; background: linear-gradient(110deg,#f7f0df,#fffdf7); border-radius: 8px; margin-bottom: 14px; }
.redeem-code-summary > span { display: block; color: #96835e; font-size: 10px; font-family: monospace; }
.redeem-code-summary > strong { display: block; margin-top: 10px; color: var(--ink); font-size: 14px; line-height: 1.9; font-weight: 550; }
.redeem-code-summary > small { display: block; margin-top: 7px; color: var(--accent); font-size: 11px; }
.redeem-login-tabs { margin-bottom: 20px; display: flex; }
.redeem-login-tabs > button { flex: 1; }
.redeem-account-summary { display: flex; align-items: center; gap: 12px; background: #f4f5ef; border: 1px solid #e4e8db; border-radius: 8px; padding: 17px; margin: 17px 0 23px; }
.redeem-account-summary strong { display: block; font-size: 13px; font-weight: 550; }
.redeem-account-summary span:not(.avatar) { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.redeem-change { display: flex; margin: 20px auto 0; font-size: 10px; }
.redeem-result-icon { width: 50px; height: 50px; display: grid; place-items: center; background: #edf3eb; color: #5a8a73; border: 1px solid #dbe5d4; border-radius: 50%; font-size: 23px; margin: 22px 0 18px; }
.redeem-footer { max-width: 1120px; padding: 25px 36px; margin: 0 auto; border-top: 1px solid #ded7c8; }
@media(max-width:1100px) {
 .stock-breakdown { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .redeem-main { gap: 45px; grid-template-columns: 1fr 440px; padding: 45px 30px; }
 .redeem-intro h1 { font-size: 29px; }
 .redeem-card { padding: 27px; }
}
@media(max-width:800px) {
 .redeem-main { display: block; max-width: 550px; padding: 30px 22px; }
 .redeem-intro { padding: 0; margin-bottom: 25px; }
 .redeem-intro h1 { font-size: 29px; line-height: 1.5; }
 .redeem-intro h1 br { display: none; }
 .redeem-intro h1 > span { font-size: 17px; }
 .redeem-intro > p { font-size: 11px; }
 .redeem-emblem, .redeem-trust, .redeem-intro .redeem-footnote { display: none; }
 .redeem-header { height: 75px; padding: 0 24px; }
 .rd-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .redeem-entry { display: none; }
}
@media(max-width:600px) {
 .rd-summary article { padding: 14px 16px; }
 .rd-summary strong { font-size: 23px; }
 .stock-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0 16px 18px; }
 .stock-breakdown > div { padding: 12px; }
 .rd-pagination { align-items: center; }
 .rd-table { min-width: 630px; }
 #redemption-order-dialog { padding: 20px 16px; }
 .rd-actions { display: grid; grid-template-columns: 1fr 1fr; }
 .rd-actions > button { min-width: 0; font-size: 9px; padding: 8px; }
 .rd-detail-hero { flex-wrap: wrap; }
 .rd-plan-item { grid-template-columns: minmax(0,1fr) 55px 26px; gap: 6px; }
 .rd-plan-item select { font-size: 10px; }
 .redeem-main { padding: 24px 14px; }
 .redeem-header { height: 70px; padding: 0 18px; }
 .redeem-brand b { font-size: 20px; }
 .redeem-brand small { font-size: 7px; letter-spacing: 1px; }
 .redeem-header > a:last-child { font-size: 9px; }
 .redeem-intro .eyebrow { font-size: 8px; }
 .redeem-intro h1 { font-size: 25px; }
 .redeem-card { padding: 23px 20px; border-radius: 12px; }
 .redeem-steps { margin-bottom: 25px; gap: 5px; }
 .redeem-steps li { font-size: 9px; gap: 4px; }
 .redeem-steps b { width: 20px; height: 20px; font-size: 8px; }
 .redeem-card h2 { font-size: 19px; }
 .redeem-card input { font-size: 11px; }
 .redeem-footer { padding: 20px 22px; font-size: 8px; }
}


/* After confirmation, the result card contains only state + percentage progress. */
.redeem-page.result-mode .redeem-card { min-height: 285px; display: flex; flex-direction: column; justify-content: center; }
.redeem-page.result-mode #redeem-workspace { width: 100%; }
#redeem-result { text-align: center; padding: 12px 0 20px; }
#redeem-result h2 { margin: 0 0 22px; font-size: 24px; font-weight: 600; }
.redeem-percent { margin-bottom: 22px; font-size: 48px; font-weight: 550; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: #9a7e43; }
.redeem-percent span { margin-left: 4px; font-size: 21px; font-weight: 400; }
.redeem-progress { display: block; width: 100%; height: 9px; appearance: none; border: 0; border-radius: 8px; overflow: hidden; background: #eee8da; }
.redeem-progress::-webkit-progress-bar { background: #eee8da; border-radius: 8px; }
.redeem-progress::-webkit-progress-value { background: #bba168; border-radius: 8px; transition: width .35s ease; }
.redeem-progress::-moz-progress-bar { background: #bba168; border-radius: 8px; }
.redeem-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.redeem-header-actions #redeem-change-code { margin: 0; }
@media(max-width:600px) { .redeem-header-actions { max-width: 150px; gap: 3px 10px; } .redeem-header-actions .text-button { font-size: 9px; } }
@media(max-width:600px) { .redeem-page.result-mode .redeem-card { min-height: 255px; } .redeem-percent { font-size: 42px; } }

.admin-login-main {width:min(460px,100%);min-height:100vh;padding:70px 22px;display:flex;flex-direction:column;align-items:center;gap:28px;}
.admin-login-main .redeem-card {width:100%;padding:30px;}
.admin-login-main h1 {font-size:25px;margin:12px 0;}
