:root {
    --member-card-width: 856px;
    --member-card-height: 540px;
}

.member-card-viewport {
    width: 100%;
    overflow: hidden;
}

.member-card-holder {
    position: relative;
    width: var(--member-card-width);
    height: var(--member-card-height);
    margin: 0 auto;
}

.member-card,
.member-card * {
    box-sizing: border-box;
}

.member-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: var(--member-card-width);
    height: var(--member-card-height);
    overflow: hidden;
    border-radius: 26px;
    background: #fbfaf7;
    color: #062f2a;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    transform-origin: top left;
}

.member-card-header {
    position: relative;
    flex: 0 0 138px;
    height: 138px;
    overflow: hidden;
    padding: 29px 40px;
    background: linear-gradient(110deg, #073f32 0%, #0a4a3a 58%, #032d27 100%);
    color: #ffffff;
}

.member-card-header-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image:
        radial-gradient(circle at 78% 15%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.5px),
        repeating-linear-gradient(130deg, transparent 0 20px, rgba(255, 255, 255, 0.10) 21px, transparent 22px);
    background-size: 14px 14px, auto;
}

.member-card-brand {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.member-card-brand-name {
    min-height: 48px;
    padding: 1px 0 3px;
    overflow: visible;
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-card-brand-subtitle {
    margin-top: 12px;
    color: #d89a42;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.member-card-accent {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 5px;
    background: #c27b2c;
}

.member-card-content {
    display: grid;
    flex: 0 0 334px;
    grid-template-columns: 210px minmax(0, 1fr) 190px;
    gap: 26px;
    width: 100%;
    height: 334px;
    padding: 26px 38px 16px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 22% 80%, rgba(191, 151, 91, 0.08), transparent 55%),
        linear-gradient(180deg, #fffdfa 0%, #fbfaf7 100%);
}

.member-card-identity,
.member-card-details {
    min-width: 0;
}

.member-card-photo {
    width: 180px;
    height: 188px;
    overflow: hidden;
    border: 1px solid #d9e1dd;
    border-radius: 20px;
    background: #ffffff;
}

.member-card-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-card-photo-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: #e6e9ff;
    color: #4f46e5;
    font-size: 48px;
    font-weight: 700;
}

.member-card-barcode-box {
    display: flex;
    width: 210px;
    height: 94px;
    margin-top: 14px;
    padding: 7px 10px 5px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #d9e1dd;
    border-radius: 14px;
    background: #ffffff;
}

.member-card-barcode-box svg {
    display: block;
    width: 100%;
    max-width: 190px;
    height: 78px;
    margin: 0 auto;
    overflow: visible;
}

.member-card-details {
    padding-top: 18px;
}

.member-card-label {
    color: #62706a;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.member-card-name {
    max-width: 100%;
    margin-top: 8px;
    min-height: 44px;
    padding: 2px 0 4px;
    overflow: visible;
    color: #062f2a;
    font-size: 31px;
    font-weight: 700;
    line-height: 38px;
    white-space: nowrap;
}

.member-card-divider {
    width: 100%;
    height: 1px;
    margin: 17px 0;
    background: #d0a167;
}

.member-card-number {
    max-width: 100%;
    min-height: 40px;
    margin-top: 7px;
    overflow: hidden;
    color: #062f2a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.18;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.member-card-dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 76px;
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid #d9e1dd;
    border-radius: 14px;
    background: #ffffff;
}

.member-card-date-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.member-card-date-icon {
    display: flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e5f0ea;
    color: #073f32;
}

.member-card-date-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.member-card-date-content {
    min-width: 0;
}

.member-card-date-label {
    color: #62706a;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.member-card-date {
    margin-top: 5px;
    color: #062f2a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.member-card-date-divider {
    width: 1px;
    height: 46px;
    background: #d9e1dd;
}

.member-card-qr-box {
    align-self: start;
    height: 282px;
    padding: 18px 16px 14px;
    overflow: hidden;
    border: 1px solid #d9e1dd;
    border-radius: 18px;
    background: #ffffff;
    text-align: center;
}

.member-card-qr-box canvas,
.member-card-qr-box img {
    display: block;
    width: 148px;
    height: 148px;
    margin: 0 auto;
}

.member-card-qr-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 12px;
    color: #63706b;
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
}

.member-card-qr-caption-icon {
    display: flex;
    width: 26px;
    height: 32px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    color: #c27b2c;
}

.member-card-qr-caption-icon svg {
    width: 24px;
    height: 30px;
    stroke-width: 1.8;
}

.member-card-footer {
    display: flex;
    flex: 0 0 68px;
    width: calc(100% - 76px);
    height: 68px;
    margin: 0 38px;
    padding: 14px 0 12px;
    align-items: center;
    justify-content: space-between;
    overflow: visible;
    border-top: 1px solid #d9e1dd;
    color: #173e36;
    font-size: 12px;
}

.member-card-footer-item {
    display: flex;
    min-width: 0;
    max-width: 47%;
    align-items: center;
    gap: 9px;
}

.member-card-footer-item svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: #c27b2c;
    stroke-width: 1.8;
}

.member-card-footer-item span {
    display: block;
    min-height: 20px;
    padding: 1px 0 2px;
    overflow: visible;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media print {
    .member-card {
        box-shadow: none;
    }
}
