/* ========== Trang Ví tiền ========== */
.page-wallet {
  background: linear-gradient(180deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
  min-height: 100vh;
}

.wallet-app {
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* Thanh tiêu đề */
.wallet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(30, 58, 95, 0.9);
  backdrop-filter: blur(8px);
}

.wallet-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
}

.wallet-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.wallet-header-placeholder {
  width: 40px;
}

/* Khu vực hero - Điểm tín dụng + Tài khoản ví */
.wallet-hero {
  position: relative;
  padding: 24px 20px;
  overflow: hidden;
}

.wallet-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.35) 0%, transparent 45%),
              radial-gradient(circle at 70% 60%, rgba(245, 158, 11, 0.25) 0%, transparent 40%),
              radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 35%);
  pointer-events: none;
}

.wallet-hero-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

/* Biểu đồ tròn + Điểm tín dụng */
.wallet-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wallet-circle-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.wallet-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.wallet-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 8;
}

.wallet-circle-fill {
  fill: none;
  stroke: #f97316;
  stroke-width: 8;
  stroke-linecap: round;
  /* 500/1000 = 50% → stroke-dasharray do JS set */
  transition: stroke-dasharray 0.3s ease;
}

.wallet-circle-value {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: #f97316;
}

.wallet-stars {
  margin-top: 8px;
  display: flex;
  gap: 2px;
}

.wallet-stars i {
  font-size: 0.85rem;
}

.wallet-stars i.wallet-star--full {
  color: #f97316;
}

.wallet-stars i.wallet-star--half {
  color: #f97316;
}

.wallet-stars i.wallet-star--empty {
  color: rgba(255, 255, 255, 0.35);
}

.wallet-credit-label {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 500;
}

/* Tài khoản ví bên phải */
.wallet-account {
  text-align: right;
}

.wallet-account-title {
  font-size: 0.85rem;
  color: #fff;
  margin: 0 0 4px 0;
}

.wallet-account-id {
  font-size: 1.1rem;
  font-weight: 700;
  color: #22c55e;
  margin: 0 0 8px 0;
}

.wallet-account-balance-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2px 0;
}

.wallet-account-balance {
  font-size: 1.25rem;
  font-weight: 700;
  color: #22c55e;
  margin: 0;
}

/* Khu vực chi tiết (nền 2026) */
.wallet-detail {
  position: relative;
  margin: 0 20px 24px;
  min-height: 140px;
  overflow: hidden;
}

.wallet-detail-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.wallet-year {
  font-size: 5rem;
  font-weight: 800;
  color: rgba(251, 191, 36, 0.2);
  letter-spacing: 0.02em;
  user-select: none;
}

.wallet-detail-card {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  overflow: hidden;
}

.wallet-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.wallet-detail-row:last-child {
  border-bottom: none;
}

.wallet-detail-row--link {
  transition: background 0.2s;
}

.wallet-detail-row--link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.wallet-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-detail-icon--green {
  background: #22c55e;
  color: #fff;
}

.wallet-detail-icon--transparent {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.wallet-detail-text {
  flex: 1;
}

.wallet-detail-line {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.wallet-detail-line--sub {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.95;
}

.wallet-detail-line--sub i {
  margin-right: 6px;
  opacity: 0.9;
}

.wallet-detail-label {
  flex: 1;
  font-size: 0.95rem;
  color: #fff;
}

.wallet-detail-chevron {
  font-size: 0.75rem;
  opacity: 0.8;
  transform: rotate(-90deg);
}

/* Lịch sử giao dịch rút tiền */
.wallet-transactions {
  padding: 16px 20px;
  position: relative;
}

.wallet-transactions-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 12px 0;
}

.wallet-transactions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-transactions-empty {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0;
  padding: 12px 0;
}

.wallet-tx {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 4px solid rgba(255, 255, 255, 0.4);
}

.wallet-tx--pending { border-left-color: #f59e0b; }
.wallet-tx--approved { border-left-color: #22c55e; }
.wallet-tx--rejected { border-left-color: #ef4444; }

.wallet-tx-row {
  margin: 0;
  font-size: 0.9rem;
  color: #fff;
}

.wallet-tx-amount {
  font-weight: 700;
}

.wallet-tx-status {
  float: right;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.95;
}

.wallet-tx-detail {
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.9;
}

.wallet-tx-time {
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.75;
}

/* Nút Rút tiền */
.wallet-actions {
  padding: 0 20px;
}

.wallet-cta {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.wallet-cta:hover {
  background: #16a34a;
}

.wallet-cta:active {
  transform: scale(0.98);
}

/* Modal rút tiền */
.wallet-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wallet-modal.is-open {
  display: flex;
}
.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.wallet-modal-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.wallet-modal-content {
  padding: 24px;
}
.wallet-modal-title {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3a5f;
  text-align: center;
}
.wallet-withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wallet-withdraw-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.wallet-withdraw-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}
.wallet-withdraw-input:focus {
  outline: none;
  border-color: #1e3a5f;
}
.wallet-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.wallet-modal-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.wallet-modal-btn--primary {
  background: #22c55e;
  color: #fff;
}
.wallet-modal-btn--secondary {
  background: #e2e8f0;
  color: #475569;
}
.wallet-modal-success {
  text-align: center;
}
.wallet-success-icon {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 16px;
}
.wallet-success-text {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}
