.id-card-wrap {
  perspective: 1200px;
  width: 100%;
  max-width: 320px;
  margin: auto;
}

.id-card-inner {
  position: relative;
  width: 100%;
  height: 500px;
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
}

.id-card-wrap:hover .id-card-inner {
  transform: rotateY(180deg);
}

.id-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.22);
  border: 1px solid #d7d7d7;
  background: #fff;
}

/* FRONT */

.id-card-front {
  background: linear-gradient(160deg, #046f09 0%, #046f09 46%, #e7f1db 46.5%, #ffffff 70%);
  color: #222;
}

.id-top-design {
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 135px;
  background: linear-gradient(135deg, transparent 49%, #f1cb17 50%, #f1cb17 54%, #dce8cb 55%);
  border-bottom-left-radius: 100px;
}

.id-front-header, .id-back-header {
  text-align: left;
  padding: 18px 18px 8px;
  position: relative;
  z-index: 2;
}

.company-logo {
  width: 78%;
  max-width: 220px;
}

.member-photo-wrap {
  text-align: center;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.member-photo {
  width: 130px;
  height: 160px;
  object-fit: cover;
  border-radius: 20px;
  border: 5px solid #cfd8d1;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.member-info {
  margin-top: 18px;
  padding: 0 16px;
}

.member-name {
  font-size: 30px;
  font-weight: 700;
  color: #0aaf1b;
  margin-bottom: 2px;
  text-transform: uppercase;
  line-height: 1.1;
}

.member-post {
  font-size: 18px;
  font-weight: 600;
  color: #222;
  margin-bottom: 18px;
}

.member-details {
  width: 82%;
  margin: 0 auto;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}

.detail-row .label {
  min-width: 62px;
  font-size: 17px;
  font-weight: 700;
  color: #18b22c;
  text-align: left;
}

.detail-row .value {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  color: #111;
  text-align: left;
}

.detail-row.detail-email {
  justify-content: center;
  margin-top: 12px;
}

.detail-row .full {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  word-break: break-word;
}

.barcode-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  text-align: center;
  padding: 0 20px;
}

.barcode-img {
  width: 78%;
  max-width: 220px;
  border: 2px solid #33a53f;
  padding: 3px;
  background: #fff;
}

/* BACK */

.id-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(165deg, #f3f3f3 0%, #f3f3f3 73%, #f1cb17 73.5%, #046f09 75%, #046f09 100%);
  color: #222;
  display: flex;
  flex-direction: column;
}

.terms-box {
  padding: 10px 26px 0;
  flex: 1;
}

.terms-box h5 {
  color: #14a928;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.terms-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.terms-box ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.5;
  color: #333;
}

.terms-box ul li::before {
  content: "";
  width: 14px;
  height: 14px;
  background: #12b220;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 7px;
  box-shadow: 0 0 0 3px rgba(18, 178, 32, 0.18);
}

.signature-box {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 10px;
}

.signature-line {
  display: inline-block;
  font-size: 22px;
  color: #222;
  border-top: 2px solid #666;
  padding-top: 8px;
  min-width: 140px;
}

.back-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 24px 22px;
  gap: 15px;
}

.issue-expire p {
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
}

.qr-box img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
}

/* Responsive */

@media (max-width: 576px) {
  .id-card-inner {
    height: 460px;
  }
}

@media (max-width: 576px) {
  .member-name {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .member-post {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .detail-row .label, .detail-row .value {
    font-size: 15px;
  }
}

@media (max-width: 576px) {
  .terms-box h5 {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .terms-box ul li {
    font-size: 15px;
  }
}

