/* NEXT-RC Redeem Code System (CSP-safe) */
.rd-shell {
    max-width: 1080px;
    margin: 26px auto 64px;
    padding: 0 18px;
}

.rd-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(20, 25, 38, 0.94), rgba(13, 17, 26, 0.96));
    border: 1px solid rgba(255, 145, 0, 0.32);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
    margin-bottom: 18px;
}

.rd-hero-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.rd-hero-sub {
    margin: 0;
    color: #9fb0c8;
    font-size: 14px;
}

.rd-cash-box {
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rd-cash-box span { font-size: 12px; color: #94a3b8; }
.rd-cash-box b { font-size: 20px; color: #38bdf8; font-variant-numeric: tabular-nums; }

.rd-card {
    padding: 20px 22px;
    border-radius: 16px;
    background: rgba(15, 20, 31, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 18px;
}

.rd-admin-card {
    border-color: rgba(255, 179, 71, 0.35);
}

.rd-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.rd-card-head h2, .rd-sub-title {
    margin: 0 0 12px;
    font-size: 18px;
    color: #fff;
}

.rd-card-head h2 { margin-bottom: 0; }

.rd-link-muted {
    color: #94a3b8;
    font-size: 13px;
    text-decoration: none;
}

.rd-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.rd-input, .rd-select {
    background: rgba(9, 13, 21, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
}

.rd-input { flex: 1; min-width: 210px; }
.rd-code-input { text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }

.rd-btn {
    border: 0;
    border-radius: 10px;
    padding: 11px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #111827;
}

.rd-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.rd-btn-sm {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
}

.rd-alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.rd-alert.is-hidden { display: none; }
.rd-alert.err { background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.42); color: #fecaca; }
.rd-alert.ok  { background: rgba(34, 197, 94, 0.14); border: 1px solid rgba(34, 197, 94, 0.42); color: #bbf7d0; }

.rd-hist-list { display: flex; flex-direction: column; gap: 8px; }
.rd-hist-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13.5px;
}

.rd-muted { color: #94a3b8; font-size: 12.5px; }

.rd-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.rd-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #cbd5e1; }
.rd-split { display: flex; gap: 8px; }
.rd-split .rd-input { min-width: 0; }

.rd-admin-table-wrap { overflow-x: auto; margin-top: 18px; }
.rd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rd-table th, .rd-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    color: #e2e8f0;
}
.rd-table th { color: #94a3b8; font-weight: 600; }

.rd-field-wide { grid-column: 1 / -1; }
.rd-textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
