/* =================================================
   GIAO DIỆN ĐỔI MÃ & LỊCH SỬ (redeem-code.css)
================================================= */

.redeem-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: inherit;
}

/* --- CARD CHUNG --- */
.redeem-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    margin-bottom: 35px;
    overflow: hidden;
}

.redeem-card-header {
    padding: 25px 30px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
    display: flex;
    align-items: center;
    gap: 15px;
}

.redeem-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 12px;
}

.redeem-header-icon svg {
    width: 28px;
    height: 28px;
}

.redeem-card-header h2 { margin: 0 0 5px 0; font-size: 22px; color: #0f172a; font-weight: 700; }
.redeem-card-header h3 { margin: 0; font-size: 18px; color: #1e293b; font-weight: 700; }
.redeem-card-header p { margin: 0; font-size: 14px; color: #64748b; }

.redeem-card-body {
    padding: 30px;
}

/* --- THÔNG BÁO LỖI / THÀNH CÔNG --- */
.redeem-alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 15px;
    font-weight: 500;
}
.redeem-alert.error { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.redeem-alert.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* --- FORM NHẬP MÃ --- */
.redeem-form-group { margin-bottom: 20px; max-width: 500px;}
.redeem-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #334155; font-size: 14px; }

.redeem-input-wrapper {
    position: relative;
    width: 100%;
}

.redeem-input-wrapper svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

.redeem-input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    font-size: 16px;
    color: #334155;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
    text-transform: uppercase; /* Tự động viết hoa mã */
    letter-spacing: 1px;
}

.redeem-input-wrapper input:focus {
    border-color: #f59e0b; /* Màu vàng cam */
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* --- NÚT BẤM ĐỔI MÃ --- */
.redeem-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none; outline: none;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.redeem-btn svg { width: 20px; height: 20px; }

.redeem-btn:hover { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); transform: translateY(-1px); }

/* --- BẢNG LỊCH SỬ ĐỔI MÃ --- */
.table-responsive { overflow-x: auto; }
.redeem-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.redeem-table th { background: #f8fafc; color: #475569; font-weight: 600; text-align: left; padding: 16px 25px; font-size: 14px; border-bottom: 1px solid #e2e8f0; }
.redeem-table td { padding: 16px 25px; color: #334155; font-size: 15px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.redeem-table tbody tr:last-child td { border-bottom: none; }
.redeem-table tbody tr:hover { background-color: #f8fafc; }

.redeem-code-badge { background: #fef3c7; color: #d97706; padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.redeem-reward-val { font-weight: 700; color: #10b981; }
.redeem-time { color: #64748b !important; font-size: 14px !important; }

/* Mobile Responsive */
@media (max-width: 600px) {
    .redeem-card-header, .redeem-card-body { padding: 20px; }
    .redeem-btn { width: 100%; }
}