/**
 * Certify 會員控制台 [certify-member-panel]
 */

.certify-member-panel {
    --mp-bg: #f4f1eb;
    --mp-navy: #163a5c;
    --mp-navy-deep: #0f2d47;
    --mp-blue: #1e40af;
    --mp-blue-hover: #1d4ed8;
    --mp-text: #0f172a;
    --mp-muted: #64748b;
    --mp-border: #e2e8f0;
    --mp-card: #ffffff;
    --mp-radius: 16px;
    --mp-radius-sm: 10px;
    --mp-shadow: 0 8px 32px rgba(15, 45, 71, 0.08);
    --mp-gradient: linear-gradient(135deg, #2563eb 0%, #d4a017 100%);
    --mp-promo-gradient: linear-gradient(90deg, #ff4b91 0%, #e91e8c 100%);
    box-sizing: border-box;
    color: var(--mp-text);
    margin: 0 0 2rem;
}

.certify-member-panel *,
.certify-member-panel *::before,
.certify-member-panel *::after {
    box-sizing: border-box;
}

.certify-member-panel--guest {
    text-align: center;
    padding: 2rem;
}

.certify-member-panel__guest-msg {
    margin: 0 0 1rem;
    color: var(--mp-muted);
}

.certify-member-panel__guest-btn {
    display: inline-flex;
    padding: 10px 22px;
    background: var(--mp-blue);
    color: #fff;
    text-decoration: none;
    border-radius: var(--mp-radius-sm);
    font-weight: 600;
}

.certify-member-panel__layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: clamp(16px, 2.5vw, 24px);
    align-items: start;
}

@media (max-width: 900px) {
    .certify-member-panel__layout {
        grid-template-columns: 1fr;
    }
}

/* ── Sidebar ─────────────────────────────────── */
.certify-mp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.certify-mp-sidebar__nav {
    background: #FFF;
    border-radius: var(--mp-radius);
    padding: 10px;
    box-shadow: var(--mp-shadow);
}

.certify-mp-sidebar__footer {
    margin-top: auto;
}

.certify-mp-sidebar__logout {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
    font-size: 14px;
    font-weight: 500;
}

.certify-mp-sidebar__logout:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.certify-mp-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.certify-mp-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #4a5565;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.certify-mp-sidebar__link:hover {
    background: #4a5565;
    color: #fff;
    text-decoration: none;
}

.certify-mp-sidebar__link.is-active {
    background: #4a5565;
    color: #fff;
}

.certify-mp-sidebar__icon {
    display: flex;
    flex-shrink: 0;
    opacity: 0.95;
}

.certify-mp-sidebar__promo {
    background: var(--mp-navy);
    border-radius: var(--mp-radius);
    padding: 18px 16px;
    color: #fff;
    text-align: center;
    box-shadow: var(--mp-shadow);
}

.certify-mp-sidebar__promo-icon {
    font-size: 28px;
    color: #fbbf24;
    margin-bottom: 8px;
}

.certify-mp-sidebar__promo-title {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 15px;
}

.certify-mp-sidebar__promo-text {
    margin: 0 0 14px;
    font-size: 13px;
    opacity: 0.85;
}

.certify-mp-sidebar__promo-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--mp-promo-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.certify-mp-sidebar__promo-btn:hover {
    color: #fff;
    opacity: 0.95;
    text-decoration: none;
}

/* ── Main / cards ────────────────────────────── */
.certify-mp-main,
.certify-member-panel__main {
    min-width: 0;
}

.certify-mp-card {
    background: var(--mp-card);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
    padding: clamp(18px, 2.5vw, 28px);
}

.certify-mp-card--flush {
    padding: 0;
    overflow: hidden;
}

.certify-mp-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.certify-mp-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-navy);
}

/* ── Preview hero ────────────────────────────── */
.certify-mp-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.certify-mp-hero__left {
    display: flex;
    gap: 18px;
    flex: 1 1 280px;
    min-width: 0;
}

.certify-mp-hero__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.certify-mp-hero__welcome {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--mp-muted);
}

.certify-mp-hero__name {
    margin: 0 0 8px;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    color: var(--mp-navy);
    line-height: 1.2;
}

.certify-mp-hero__member-id {
    margin: 8px 0 14px;
    font-size: 13px;
    color: var(--mp-blue);
    font-weight: 600;
}

.certify-mp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.certify-mp-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    justify-content: flex-end;
    flex: 0 1 auto;
}

.certify-mp-stat {
    text-align: center;
    min-width: 72px;
}

.certify-mp-stat__drop {
    width: 72px;
    height: 72px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% 50% 50% 0;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

.certify-mp-stat--blue .certify-mp-stat__drop { background: #3b82f6; }
.certify-mp-stat--navy .certify-mp-stat__drop { background: #1e3a8a; }
.certify-mp-stat--gold .certify-mp-stat__drop { background: #d97706; }
.certify-mp-stat--teal .certify-mp-stat__drop { background: #0d9488; }

.certify-mp-stat__label {
    font-size: 11px;
    color: var(--mp-muted);
    line-height: 1.3;
    display: block;
    max-width: 88px;
}

.certify-mp-preview__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (max-width: 960px) {
    .certify-mp-preview__grid {
        grid-template-columns: 1fr;
    }
}

/* ── Membership card ─────────────────────────── */
.certify-mp-dl {
    margin: 0;
}

.certify-mp-dl__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mp-border);
}

.certify-mp-dl__row:last-child {
    border-bottom: none;
}

.certify-mp-dl dt {
    margin: 0;
    font-size: 14px;
    color: var(--mp-muted);
    font-weight: 500;
}

.certify-mp-dl dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.certify-mp-dl dd.is-warning {
    color: #ea580c;
}

.certify-mp-membership__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 8px;
}

/* ── Star task card ──────────────────────────── */
.certify-mp-star-task {
    position: relative;
    overflow: hidden;
    background: var(--mp-gradient);
    color: #fff;
    min-height: 280px;
}

.certify-mp-star-task__lock {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    opacity: 0.2;
    pointer-events: none;
}

.certify-mp-star-task__body {
    position: relative;
    z-index: 1;
    padding-left: 48px;
}

.certify-mp-star-task__eyebrow {
    margin: 0 0 6px;
    font-size: 13px;
    opacity: 0.95;
}

.certify-mp-star-task__title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 800;
}

.certify-mp-star-task__list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.7;
}

.certify-mp-star-task__list li::before {
    content: "» ";
    font-weight: 700;
}

/* ── Buttons & badges ────────────────────────── */
.certify-mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--mp-radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}

.certify-mp-btn--primary {
    background: var(--mp-navy);
    color: #fff;
}

.certify-mp-btn--primary:hover {
    background: var(--mp-navy-deep);
    color: #fff;
}

.certify-mp-btn--outline {
    background: #eff6ff;
    color: var(--mp-blue);
    border: 1px solid #bfdbfe;
}

.certify-mp-btn--ghost {
    background: #fff;
    color: var(--mp-navy);
    border: 1px solid var(--mp-border);
}

.certify-mp-btn--soft {
    background: #ffedd5;
    color: #c2410c;
}

.certify-mp-btn--soft.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.certify-mp-btn--gradient {
    width: 100%;
    background: var(--mp-promo-gradient);
    color: #fff;
    border-radius: 999px;
    padding: 14px 20px;
}

.certify-mp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.certify-mp-badge--plan {
    background: #e0e7ff;
    color: var(--mp-navy);
}

.certify-mp-badge--muted {
    background: #f1f5f9;
    color: #475569;
}

.certify-mp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.certify-mp-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.certify-mp-status.is-active .certify-mp-status__dot {
    background: #22c55e;
}

/* ── Inner pages ─────────────────────────────── */
.certify-mp-page__head {
    margin-bottom: 20px;
}

.certify-mp-page__head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.certify-mp-import-summary {
    margin: 0 0 16px;
    font-size: 14px;
    color: #374151;
}

.certify-mp-table tr.is-success td {
    color: #047857;
}

.certify-mp-table tr.is-error td {
    color: #b91c1c;
}

.certify-mp-page__head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.certify-mp-page__title {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 26px);
    font-weight: 800;
    color: var(--mp-navy);
}

.certify-mp-page__desc {
    margin: 0;
    color: var(--mp-muted);
    font-size: 14px;
}

.certify-mp-breadcrumb {
    margin: 0 0 8px;
    font-size: 13px;
}

.certify-mp-breadcrumb a {
    color: var(--mp-blue);
    text-decoration: none;
}

.certify-mp-page .certify-mp-card + .certify-mp-card {
    margin-top: 16px;
}

.certify-mp-empty {
    margin: 0;
    padding: 32px 24px;
    text-align: center;
    color: var(--mp-muted);
}

.certify-mp-empty--left {
    text-align: left;
    padding: 0 0 16px;
}

/* ── 頭像上傳 ────────────────────────────────── */
.certify-mp-avatar-upload {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mp-border);
}

.certify-mp-avatar-upload__label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
}

.certify-mp-avatar-upload__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.certify-mp-avatar-upload__preview-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    border: 2px solid #fff;
    box-shadow: 0 2px 12px rgba(15, 45, 71, 0.12);
}

.certify-mp-avatar-upload__preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.certify-mp-avatar-upload__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--mp-muted);
    line-height: 1.3;
}

.certify-mp-avatar-upload__controls {
    flex: 1 1 200px;
    min-width: 0;
}

.certify-mp-avatar-upload__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.certify-mp-avatar-upload__pick {
    cursor: pointer;
    margin-bottom: 8px;
}

.certify-mp-avatar-upload__hint {
    margin: 0;
    font-size: 12px;
    color: var(--mp-muted);
    line-height: 1.5;
}

.certify-mp-avatar-upload__status {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--mp-blue);
    font-weight: 500;
}

.certify-mp-avatar-upload__status.is-loading {
    opacity: 0.85;
}

/* ── Forms ───────────────────────────────────── */
.certify-mp-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.certify-mp-form--narrow {
    max-width: 480px;
}

@media (max-width: 640px) {
    .certify-mp-form__grid {
        grid-template-columns: 1fr;
    }
}

.certify-mp-field--full {
    grid-column: 1 / -1;
}

.certify-mp-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
}

.certify-mp-field input,
.certify-mp-field textarea,
.certify-mp-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

/* Bootstrap 風格 input group（電話國碼 + 號碼） */
.certify-mp-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.certify-mp-input-group__code {
    flex: 0 0 auto;
    width: auto;
    min-width: 96px;
    max-width: 110px;
    padding: 10px 12px;
    border: 1px solid var(--mp-border);
    border-right: 0;
    border-radius: var(--mp-radius-sm) 0 0 var(--mp-radius-sm);
    font-size: 14px;
    font-weight: 600;
    background: #f8fafc;
    color: var(--mp-navy);
    cursor: pointer;
}

.certify-mp-input-group__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--mp-border);
    border-radius: 0 var(--mp-radius-sm) var(--mp-radius-sm) 0;
    font-size: 14px;
}

.certify-mp-input-group__code:focus,
.certify-mp-input-group__input:focus {
    outline: none;
    border-color: var(--mp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    z-index: 1;
    position: relative;
}

/* 學歷結構化 */
.certify-mp-education {
    margin-top: 24px;
    padding-top: 8px;
    border-top: 1px solid var(--mp-border);
}

.certify-mp-education__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-navy);
}

.certify-mp-education__desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--mp-muted);
}

.certify-mp-education__card {
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    padding: 14px;
    background: #fafbfc;
}

.certify-mp-education__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.certify-mp-education__count {
    font-size: 13px;
    color: var(--mp-muted);
    font-weight: 600;
}

.certify-mp-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
}

.certify-mp-education__groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certify-mp-education__empty {
    margin: 0;
    font-size: 13px;
    color: var(--mp-muted);
    text-align: center;
    padding: 12px 0;
}

.certify-mp-json-group {
    background: #fff;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    padding: 12px;
}

.certify-mp-json-group__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.certify-mp-json-group__num {
    font-size: 13px;
    font-weight: 700;
    color: var(--mp-navy);
}

.certify-mp-json-group__actions {
    display: flex;
    gap: 6px;
}

.certify-mp-json-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--mp-muted);
}

.certify-mp-json-btn:hover:not(:disabled) {
    border-color: var(--mp-blue);
    color: var(--mp-blue);
}

.certify-mp-json-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.certify-mp-json-group__body .certify-mp-field + .certify-mp-field {
    margin-top: 10px;
}

.certify-mp-json-group__body .certify-mp-field label {
    font-size: 12px;
}

.certify-mp-json-group__body .mp-edu-field {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.certify-mp-field input:focus,
.certify-mp-field textarea:focus {
    outline: none;
    border-color: var(--mp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.certify-mp-req {
    color: #dc2626;
}

.certify-mp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.certify-mp-form__foot {
    margin-top: 20px;
    padding-top: 8px;
}

.certify-mp-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--mp-radius-sm);
    font-size: 14px;
}

.certify-mp-alert[hidden] {
    display: none !important;
}

.certify-mp-alert.is-ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.certify-mp-alert.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.certify-mp-code {
    font-size: 13px;
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 4px;
}

/* ── Tables ──────────────────────────────────── */
.certify-mp-table-wrap {
    overflow-x: auto;
}

.certify-mp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.certify-mp-table th,
.certify-mp-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--mp-border);
}

.certify-mp-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--mp-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.certify-mp-order-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.certify-mp-order-status--completed { background: #dcfce7; color: #166534; }
.certify-mp-order-status--pending { background: #fef9c3; color: #854d0e; }
.certify-mp-order-status--processing { background: #dbeafe; color: #1e40af; }
.certify-mp-order-status--cancelled,
.certify-mp-order-status--failed { background: #fee2e2; color: #991b1b; }

.certify-mp-link--strong {
    font-weight: 700;
}

.certify-mp-order-payment-status {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--mp-muted, #6b7280);
    margin-top: 2px;
}

.certify-mp-order-detail__meta-sep {
    margin: 0 6px;
    color: var(--mp-muted, #6b7280);
}

.certify-mp-dl {
    margin: 0;
    display: grid;
    gap: 12px;
}

.certify-mp-dl__row {
    display: grid;
    grid-template-columns: minmax(100px, 140px) 1fr;
    gap: 8px 16px;
    align-items: baseline;
}

.certify-mp-dl__row dt {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-muted, #6b7280);
}

.certify-mp-dl__row dd {
    margin: 0;
    font-size: 15px;
}

.certify-mp-order-detail__total {
    font-size: 18px;
    color: var(--mp-primary, #1e3a5f);
}

.certify-mp-section-title--in-card {
    padding: 20px 20px 0;
    margin: 0;
}

.certify-mp-order-detail__pay-intro {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--mp-muted, #6b7280);
    margin-top: 4px;
}

.certify-mp-order-detail__remarks {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.6;
}

.certify-mp-payment-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.certify-mp-payment-status--pending_payment { background: #fef9c3; color: #854d0e; }
.certify-mp-payment-status--paid { background: #dcfce7; color: #166534; }
.certify-mp-payment-status--failed { background: #fee2e2; color: #991b1b; }

.certify-mp-order-detail__pay-url {
    display: inline-block;
    margin-top: 6px;
}

.certify-mp-payment-proof-upload {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 220px;
}

.certify-mp-payment-proof-upload__preview img,
.certify-mp-payment-proof-thumb img {
    display: block;
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--mp-border, #e5e7eb);
}

.certify-mp-payment-proof-upload__feedback {
    font-size: 13px;
}

.certify-mp-payment-proof-upload__feedback.is-ok {
    color: #166534;
}

.certify-mp-payment-proof-upload__feedback.is-error {
    color: #991b1b;
}

.certify-mp-btn--sm {
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 640px) {
    .certify-mp-dl__row {
        grid-template-columns: 1fr;
    }
}

.certify-mp-link {
    color: var(--mp-blue);
    font-weight: 600;
    text-decoration: none;
}

.certify-mp-link:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .certify-mp-table thead {
        display: none;
    }

    .certify-mp-table tr {
        display: block;
        padding: 12px 16px;
        border-bottom: 1px solid var(--mp-border);
    }

    .certify-mp-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border: none;
    }

    .certify-mp-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--mp-muted);
        flex-shrink: 0;
    }
}

/* ── Cert grid ───────────────────────────────── */
.certify-mp-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.certify-mp-cert-card__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-navy);
}

.certify-mp-cert-card__meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--mp-muted);
}

/* ── 培訓記錄及認證（courses 頁）──────────────── */
.certify-mp-courses-page .certify-mp-courses-section + .certify-mp-courses-section {
    margin-top: 28px;
}

.certify-mp-section-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-navy);
}

.certify-mp-empty--inset {
    margin: 0;
    padding: 20px 0 4px;
}

/* htabs — reset; layout handled by certify-mp-ftabs__nav when used inside courses card */
.certify-mp-htabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.certify-mp-htabs::-webkit-scrollbar { display: none; }

/* When htabs is inside the courses ftabs card, inherit ftabs__nav styles */
.certify-mp-courses-ftabs .certify-mp-htabs {
    border-bottom: 1px solid var(--mp-border);
    padding: 0 4px;
}

/* Tab buttons — unified with certify-mp-ftabs__tab */
.certify-mp-htabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 16px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--mp-muted);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.certify-mp-htabs__tab:hover { color: var(--mp-text); }

.certify-mp-htabs__tab.is-active {
    color: var(--mp-text);
    font-weight: 700;
    border-bottom-color: #8a9e2e;
}

/* Count badge */
.certify-mp-courses-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e8efb0;
    color: #3a5010;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.certify-mp-htabs__tab.is-active .certify-mp-courses-count {
    background: #8a9e2e;
    color: #fff;
}

.certify-mp-htabs__panels {
    padding-top: 0;
}

.certify-mp-htabs__panel {
    display: none;
}

.certify-mp-htabs__panel.is-active {
    display: block;
}

.certify-mp-courses-section--certs .cms-panel {
    margin: 0;
}

.certify-mp-courses-section--certs .cms-panel--qualifications {
    background: var(--mp-card-bg, #fff);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius, 12px);
    padding: 20px 22px;
}

@media (max-width: 720px) {
    .certify-mp-htabs {
        gap: 4px;
    }

    .certify-mp-htabs__tab {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ── 新增課程 ───────────────────────────────── */
.certify-mp-workshop-create .certify-mp-media-block--first {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mp-border);
}

.certify-mp-workshop-create .certify-mp-form__grid {
    margin-top: 0;
}

.certify-mp-field-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--mp-muted);
}

.certify-mp-field-hint--warn {
    color: #b45309;
}

.certify-mp-field-hint--info {
    color: #1d4ed8;
}

.certify-mp-field-readonly {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--mp-radius-sm, 8px);
    background: #f9fafb;
    border: 1px solid var(--certify-mp-border, #e5e7eb);
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
}

.certify-mp-media-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.certify-mp-media-preview {
    margin-top: 12px;
}

.certify-mp-media-preview img {
    display: block;
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--mp-border);
}

.certify-mp-media-preview--cover img {
    max-width: 360px;
}

.certify-mp-media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.certify-mp-media-gallery__item {
    position: relative;
    width: 88px;
    height: 88px;
}

.certify-mp-media-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--mp-border);
}

.certify-mp-media-gallery__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.certify-mp-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--mp-border);
    padding: 15px;
    justify-content: center;
}

.certify-mp-form__actions--compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.certify-mp-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    justify-content: flex-end;
}

.certify-mp-link--btn {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.certify-mp-table--actions .certify-mp-table__actions-col {
    min-width: 200px;
    text-align: right;
}

.certify-mp-inline-links {
    margin-top: 12px;
}

.certify-mp-page__meta {
    margin: 8px 0 0;
}

.certify-mp-form__actions-extra {
    margin-left: auto;
    align-self: center;
}

@media (max-width: 720px) {
    .certify-mp-row-actions {
        justify-content: flex-start;
    }

    .certify-mp-table--actions .certify-mp-table__actions-col {
        text-align: left;
    }
}

/* 證書管理 — 已完成課程簽發列表 */
.certify-mp-cert-issuance__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.certify-mp-cert-course {
    background: var(--mp-surface, #fff);
    border: 1px solid var(--mp-border, #e5e7eb);
    border-radius: var(--mp-radius, 12px);
    overflow: hidden;
}

.certify-mp-cert-course__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
}

.certify-mp-cert-course__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.certify-mp-cert-course__meta {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--mp-muted, #6b7280);
}

.certify-mp-cert-course__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--mp-text, #1f2937);
}

.certify-mp-cert-course__stats li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.certify-mp-cert-course__stat-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.certify-mp-cert-course__stat-icon--people {
    background: #dbeafe;
}

.certify-mp-cert-course__stat-icon--issued {
    background: #bbf7d0;
}

.certify-mp-cert-course__stat-icon--pending {
    background: #fde68a;
}

.certify-mp-btn--cert {
    background: #e8f48a;
    color: #1a1a1a;
    border: 1px solid #d4e157;
    font-weight: 600;
    white-space: nowrap;
}

.certify-mp-btn--cert:hover {
    background: #dce96f;
    color: #1a1a1a;
}

.certify-mp-btn--cert-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 999px;
}

.certify-mp-btn--cert-block {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 18px;
    text-align: center;
    border-radius: 10px;
}

.certify-mp-cert-course__toggle-label--collapse {
    display: none;
}

.certify-mp-cert-course.is-expanded .certify-mp-cert-course__toggle-label--collapse {
    display: inline;
}

.certify-mp-cert-course.is-expanded .certify-mp-cert-course__toggle-label--expand {
    display: none;
}

.certify-mp-cert-course:not(.is-expanded) .certify-mp-cert-course__toggle-label--expand {
    display: inline;
}

.certify-mp-cert-course__panel {
    margin: 0 16px;
    margin-bottom: 16px !important;
    padding: 16px 18px 18px;
    background: #fafce8;
    border: 2px solid #e8f48a;
    border-radius: 10px;
}

.certify-mp-cert-course__panel-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
}

.certify-mp-cert-students {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.certify-mp-cert-students__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.certify-mp-cert-students__item:last-child {
    border-bottom: none;
}

.certify-mp-cert-students__who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.certify-mp-cert-students__who strong {
    font-size: 15px;
}

.certify-mp-cert-students__who span {
    font-size: 13px;
    color: var(--mp-muted, #6b7280);
    word-break: break-all;
}

.certify-mp-cert-students__pending {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}

.certify-mp-cert-students__item.is-issued .certify-mp-cert-students__pending {
    color: #16a34a;
}

@media (max-width: 720px) {
    .certify-mp-cert-course__header {
        flex-direction: column;
        align-items: stretch;
    }

    .certify-mp-cert-students__item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 購買課程配額 */
.certify-mp-page__desc--quota {
    margin-top: 6px;
}

.certify-mp-buy-quota__section + .certify-mp-buy-quota__section {
    margin-top: 20px;
}

.certify-mp-quota-plans,
.certify-mp-payment-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certify-mp-quota-plan,
.certify-mp-payment-method {
    display: block;
    cursor: pointer;
}

.certify-mp-quota-plan input,
.certify-mp-payment-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.certify-mp-quota-plan__body,
.certify-mp-payment-method__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    border: 2px solid var(--mp-border, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.certify-mp-quota-plan:has(input:checked) .certify-mp-quota-plan__body,
.certify-mp-payment-method:has(input:checked) .certify-mp-payment-method__body {
    border-color: var(--mp-primary, #1e3a5f);
    box-shadow: 0 0 0 1px var(--mp-primary, #1e3a5f);
}

.certify-mp-quota-plan__name,
.certify-mp-payment-method__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--mp-text, #111827);
}

.certify-mp-quota-plan__meta {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-primary, #1e3a5f);
}

.certify-mp-quota-plan__intro,
.certify-mp-payment-method__intro {
    font-size: 13px;
    color: var(--mp-muted, #6b7280);
}

.certify-mp-quota-plan__price {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

.certify-mp-quota-plan__price.is-onsale {
    color: #b45309;
}

/* ════════════════════════════════════════════════════════════════
   Preview v2 — 控制台總覽重設計
   ════════════════════════════════════════════════════════════════ */
.certify-mp-preview-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Dark hero ─────────────────────────────────────────────────── */
.certify-mp-dark-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    background: #1c2637;
    border-radius: var(--mp-radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

/* subtle decorative circle */
.certify-mp-dark-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.certify-mp-dark-hero__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
}

.certify-mp-dark-hero__avatar {
    width: 112px;
    height: 112px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.certify-mp-dark-hero__avatar--placeholder {
    background: #2e3f55;
}

.certify-mp-dark-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Hero action buttons */
.certify-mp-dark-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    white-space: nowrap;
    font-family: inherit;
    transition: filter 0.15s ease;
    width: 100%;
}

.certify-mp-dark-btn--accent {
    background: #8a9e2e;
    color: #fff !important;
}

.certify-mp-dark-btn--accent:hover {
    background: #768a26;
    color: #fff !important;
}

.certify-mp-dark-btn--ghost {
    background: transparent;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.certify-mp-dark-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

/* Right side content */
.certify-mp-dark-hero__right {
    flex: 1;
    min-width: 0;
}

.certify-mp-dark-hero__welcome {
    margin: 0 0 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.certify-mp-dark-hero__name {
    margin: 0 0 20px;
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

/* Info chips row */
.certify-mp-dark-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.certify-mp-dark-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 110px;
}

.certify-mp-dark-chip__label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    white-space: nowrap;
}

.certify-mp-dark-chip__value {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.certify-mp-dark-chip__value--accent {
    color: #ccd226;
}

.certify-mp-dark-chip__value--warning {
    color: #f97316;
}

.certify-mp-dark-chip__value--status {
    color: #fff;
}

.certify-mp-dark-chip__value--status.certify-mp-dark-chip__value--active {
    color: #86efac;
}

.certify-mp-dark-chip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.certify-mp-dark-chip__dot--active {
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

/* Renew button */
.certify-mp-dark-renew {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.certify-mp-dark-renew:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
}

/* ── Stat cards ────────────────────────────────────────────────── */
.certify-mp-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.certify-mp-stat-card {
    background: #fff;
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
    padding: 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.certify-mp-stat-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.certify-mp-stat-card__number {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.certify-mp-stat-card__label {
    font-size: 12px;
    color: var(--mp-muted);
    font-weight: 500;
}

.certify-mp-stat-card__icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certify-mp-stat-card__icon-wrap--olive { background: #f0f4d0; }
.certify-mp-stat-card__icon-wrap--blue  { background: #dbeafe; }
.certify-mp-stat-card__icon-wrap--peach { background: #ffe4d6; }
.certify-mp-stat-card__icon-wrap--tan   { background: #f5f0e8; }

.certify-mp-stat-card__icon {
    display: flex !important;
    width: 22px;
    height: 22px;
    justify-content: center;
    align-items: center;
}

.certify-mp-stat-card__icon--book {
    color: #7a9e20;
}

.certify-mp-stat-card__icon--people {
    color: #2563eb;
}

.certify-mp-stat-card__icon--clock {
    color: #ea580c;
}

.certify-mp-stat-card__icon--ribbon {
    color: #92400e;
}

/* ── Recent courses card ───────────────────────────────────────── */
.certify-mp-recent {
    padding: 20px 22px;
}

.certify-mp-recent__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.certify-mp-recent__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.certify-mp-recent__all {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-muted);
    text-decoration: none;
}

.certify-mp-recent__all:hover {
    color: var(--mp-navy);
    text-decoration: underline;
}

.certify-mp-recent__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.certify-mp-recent__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.certify-mp-recent__row:last-child {
    border-bottom: none;
}

.certify-mp-recent__info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.certify-mp-recent__course-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.certify-mp-recent__course-title:hover {
    color: var(--mp-navy);
    text-decoration: underline;
}

.certify-mp-recent__course-date {
    font-size: 12px;
    color: var(--mp-muted);
}

.certify-mp-course-status {
    display: inline-block;
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.certify-mp-course-status--published {
    background: #dcfce7;
    color: #15803d;
}

.certify-mp-course-status--approving {
    background: transparent;
    color: #ea580c;
}

.certify-mp-course-status--draft {
    background: #f1f5f9;
    color: #475569;
}

.certify-mp-course-status--completed {
    background: #dbeafe;
    color: #1d4ed8;
}

.certify-mp-course-status--cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .certify-mp-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .certify-mp-dark-hero {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .certify-mp-dark-hero__left {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .certify-mp-dark-hero__avatar {
        width: 80px;
        height: 80px;
    }

    .certify-mp-dark-hero__actions {
        flex-direction: row;
        width: auto;
        flex: 1;
    }

    .certify-mp-dark-hero__chips {
        flex-wrap: wrap;
    }

    .certify-mp-dark-chip {
        min-width: 0;
        flex: 1 1 130px;
    }

    .certify-mp-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .certify-mp-stat-cards {
        grid-template-columns: 1fr 1fr;
    }

    .certify-mp-stat-card__number {
        font-size: 26px;
    }

    .certify-mp-dark-hero__name {
        font-size: 20px;
    }
}

/* ── Information page — profile header card ────────────────────── */
.certify-mp-info-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
}

/* Avatar + camera overlay */
.certify-mp-info-profile__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.certify-mp-info-profile__avatar {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    border: 2px solid var(--mp-border);
}

.certify-mp-info-profile__avatar--placeholder {
    background: #e2e8f0;
}

.certify-mp-info-profile__camera {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1c2637;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.certify-mp-info-profile__camera:hover {
    background: #2e3f55;
}

.certify-mp-info-profile__camera-icon {
    display: block;
    width: 13px;
    height: 13px;
    background: #fff;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Body: name + meta + subjects */
.certify-mp-info-profile__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.certify-mp-info-profile__name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.certify-mp-info-profile__meta {
    margin: 0;
    font-size: 13px;
    color: var(--mp-muted);
}

.certify-mp-info-profile__subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.certify-mp-info-subject {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #eef3c5;
    color: #3a5010;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

/* Status badge (far right) */
.certify-mp-info-profile__status {
    flex-shrink: 0;
}

.certify-mp-info-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.certify-mp-info-status--active {
    background: #dcfce7;
    color: #15803d;
}

.certify-mp-info-status--inactive {
    background: #f1f5f9;
    color: #475569;
}

.certify-mp-info-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.certify-mp-info-status--active .certify-mp-info-status__dot {
    background: #16a34a;
}

.certify-mp-info-status--inactive .certify-mp-info-status__dot {
    background: #94a3b8;
}

@media (max-width: 640px) {
    .certify-mp-info-profile {
        flex-wrap: wrap;
        gap: 14px;
    }

    .certify-mp-info-profile__status {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .certify-mp-info-profile__body {
        flex: 1 1 200px;
    }
}

/* ════════════════════════════════════════════════════════════════
   Information page — form tabs + redesigned inputs
   ════════════════════════════════════════════════════════════════ */

/* ── Tab nav ─────────────────────────────────────────────────── */
.certify-mp-ftabs {
    padding: 0;
    overflow: hidden;
}

.certify-mp-ftabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--mp-border);
    padding: 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.certify-mp-ftabs__nav::-webkit-scrollbar { display: none; }

.certify-mp-ftabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 16px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--mp-muted);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
    font-family: inherit;
}

.certify-mp-ftabs__tab:hover { color: var(--mp-text); }

.certify-mp-ftabs__tab.is-active {
    color: var(--mp-text);
    font-weight: 700;
    border-bottom-color: #8a9e2e;
}

/* Tab icons */
.certify-mp-ftabs__tab-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background: var(--mp-muted);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background 0.15s;
}

.certify-mp-ftabs__tab.is-active .certify-mp-ftabs__tab-icon { background: #3a5010; }

.certify-mp-ftabs__tab-icon--person {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
}

.certify-mp-ftabs__tab-icon--shield {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L4 6v6c0 5 3.6 9.7 8 11 4.4-1.3 8-6 8-11V6z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L4 6v6c0 5 3.6 9.7 8 11 4.4-1.3 8-6 8-11V6z'/%3E%3C/svg%3E");
}

.certify-mp-ftabs__tab-icon--ribbon {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M12 13v8M8 17l4 4 4-4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M12 13v8M8 17l4 4 4-4'/%3E%3C/svg%3E");
}

.certify-mp-ftabs__tab-icon--lock {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

/* ── Tab panels ──────────────────────────────────────────────── */
.certify-mp-ftabs__panel {
    display: none;
    padding: 24px 22px;
}

.certify-mp-ftabs__panel.is-active { display: block; }

.certify-mp-ftabs__foot {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--mp-border);
    text-align: center;
}

/* ── Redesigned field grid ───────────────────────────────────── */
.certify-mp-fgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.certify-mp-fgrid--narrow {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
}

.certify-mp-ffield { display: flex; flex-direction: column; gap: 7px; }

.certify-mp-ffield--full { grid-column: 1 / -1; }

.certify-mp-ffield__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-text);
    line-height: 1.3;
}

/* ── Redesigned input wrapper ────────────────────────────────── */
.certify-mp-finput {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    overflow: hidden;
    min-height: 52px;
}

.certify-mp-finput--readonly {
    background: #ececec;
    cursor: default;
}

.certify-mp-finput--half { max-width: 260px; }

.certify-mp-finput__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-left: 16px;
    background: #b0b8c4;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    pointer-events: none;
}

.certify-mp-finput__icon--person {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
}

.certify-mp-finput__icon--calendar {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

.certify-mp-finput__icon--phone {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.certify-mp-finput__icon--email {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpath d='M22 6l-10 7L2 6'/%3E%3C/svg%3E");
}

.certify-mp-finput__icon--location {
    align-self: flex-start;
    margin-top: 16px;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-4.35 7-10a7 7 0 1 0-14 0c0 5.65 7 10 7 10z'/%3E%3Ccircle cx='12' cy='11' r='2.5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s7-4.35 7-10a7 7 0 1 0-14 0c0 5.65 7 10 7 10z'/%3E%3Ccircle cx='12' cy='11' r='2.5'/%3E%3C/svg%3E");
}

.certify-mp-finput__icon--lock {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

/* Text inside read-only finput */
.certify-mp-finput__text {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--mp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actual text inputs + selects */
.certify-mp-finput__input,
.certify-mp-finput__select {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none !important;
    outline: none;
    font-size: 15px;
    color: #333333 !important;
    font-family: inherit;
    min-width: 0;
}

.certify-mp-finput__input:focus,
.certify-mp-finput__select:focus {
    outline: none;
}

.certify-mp-finput:focus-within {
    box-shadow: 0 0 0 2px #8a9e2e66;
}

/* Select arrow */
.certify-mp-finput--select { position: relative; }
.certify-mp-finput__select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; }
.certify-mp-finput--select::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #b0b8c4;
    pointer-events: none;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Phone input group */
.certify-mp-finput--phone .certify-mp-finput__code {
    appearance: none;
    -webkit-appearance: none;
    width: 72px;
    flex-shrink: 0;
    padding: 14px 6px 14px 0;
    background: transparent;
    border: none;
    border-right: 1px solid #d0d4d8;
    outline: none;
    font-size: 14px;
    color: var(--mp-muted);
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}

.certify-mp-finput--phone .certify-mp-finput__input {
    padding-left: 10px;
}

/* Textarea inside finput */
.certify-mp-finput--textarea {
    align-items: flex-start;
    height: auto;
}

.certify-mp-finput__textarea {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--mp-text);
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.certify-mp-finput__textarea--standalone {
    width: 100%;
    background: #FFF;
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    padding: 16px;
    outline: none;
    font-size: 15px;
    color: var(--mp-text);
    font-family: inherit;
    resize: vertical;
    min-height: 160px;
    line-height: 1.6;
    display: block;
}

.certify-mp-finput__textarea--standalone:focus {
    box-shadow: 0 0 0 2px #8a9e2e66;
}

/* ── Records list (tab 3) ────────────────────────────────────── */
.certify-mp-records-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.certify-mp-record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 14px;
    background: #f3f3f3;
    border-radius: 15px;
    margin-bottom: 15px;
}

@media (max-width: 640px) {
    .certify-mp-record-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.certify-mp-record-row:last-child { border-bottom: none; }

.certify-mp-record-row__icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #f5f6f7;
    mask-size: 18px;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: 18px;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.certify-mp-record-row__icon--cert {
    background-color: #eef3c5;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a5010' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M12 13v8M8 17l4 4 4-4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233a5010' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M12 13v8M8 17l4 4 4-4'/%3E%3C/svg%3E");
}

.certify-mp-record-row__icon--edu {
    background-color: #dbeafe;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2'%3E%3Cpath d='M22 10v6M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='2'%3E%3Cpath d='M22 10v6M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E");
}

.certify-mp-record-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.certify-mp-record-row__title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.certify-mp-record-row__meta {
    font-size: 12px;
    color: var(--mp-muted);
}

.certify-mp-record-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.certify-mp-record-badge--cert { background: #dcfce7; color: #15803d; }
.certify-mp-record-badge--expired { background: #f1f5f9; color: #64748b; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .certify-mp-fgrid { grid-template-columns: 1fr; }
    .certify-mp-ftabs__tab { padding: 12px 12px; font-size: 13px; gap: 5px; }
    .certify-mp-ftabs__panel { padding: 18px 14px; }
}

/* ── Record row extra lines (subject + dates) ─────────────────── */
.certify-mp-record-row__subject {
    font-size: 12px;
    font-weight: 600;
    color: var(--mp-navy);
}

.certify-mp-record-row__dates {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-muted);
}

/* ── 急救證書 tab ─────────────────────────────────────────────── */
.certify-mp-ftabs__tab-icon--firstaid {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
}

/* Active cert card */
.certify-mp-fa-card {
    background: #fff;
    border: 1.5px solid var(--mp-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.certify-mp-fa-card--active {
    border-color: #86efac;
    background: #ebf9ef;
}

.certify-mp-fa-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.certify-mp-fa-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #16a34a;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E") center / 22px no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E") center / 22px no-repeat;
}

.certify-mp-fa-card__label {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #166534;
}

.certify-mp-fa-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.certify-mp-fa-badge--pending  { background: #fef9c3; color: #854d0e; }
.certify-mp-fa-badge--active   { background: #dcfce7; color: #15803d; }
.certify-mp-fa-badge--expired  { background: #f1f5f9; color: #64748b; }
.certify-mp-fa-badge--revoked  { background: #fee2e2; color: #dc2626; }

.certify-mp-fa-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.certify-mp-fa-dl__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #d1fae5;
    font-size: 14px;
}

.certify-mp-fa-dl__row:last-child { border-bottom: none; }

.certify-mp-fa-dl dt { color: #166534; font-weight: 500; }
.certify-mp-fa-dl dd { margin: 0; font-weight: 700; color: #0f172a; }

.certify-mp-fa-card__img-link {
    display: block;
    margin-top: 14px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.certify-mp-fa-card__img {
    width: 100%;
    height: auto;
    display: block;
}

/* Warning notice */
.certify-mp-fa-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.certify-mp-fa-notice--warn {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
}

.certify-mp-fa-notice--info {
    background: #fefce8;
    border: 1.5px solid #fde047;
}

.certify-mp-fa-notice--info .certify-mp-fa-notice__text {
    color: #713f12;
}

.certify-mp-fa-notice__icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.certify-mp-fa-notice__text {
    margin: 0;
    font-size: 14px;
    color: #9a3412;
    line-height: 1.6;
    font-weight: 600;
}

/* Section headings */
.certify-mp-fa-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--mp-border);
}

.certify-mp-fa-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.certify-mp-fa-section__title {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--mp-navy);
}

/* File input */
.certify-mp-finput__input--file {
    padding: 10px 14px;
}

.certify-mp-ffield__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--mp-muted);
}

/* History log list */
.certify-mp-fa-log-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.certify-mp-fa-log-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.certify-mp-fa-log-row:last-child { border-bottom: none; }

.certify-mp-fa-log-row__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.certify-mp-fa-log-row__organizer {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.certify-mp-fa-log-row__cert {
    font-size: 12px;
}

.certify-mp-fa-log-row__dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--mp-muted);
    flex-shrink: 0;
    text-align: right;
}

.certify-mp-fa-log-row__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.certify-mp-fa-log-row__img-link {
    font-size: 16px;
    text-decoration: none;
    opacity: 0.7;
}

.certify-mp-fa-log-row__img-link:hover { opacity: 1; }

@media (max-width: 640px) {
    .certify-mp-fa-log-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .certify-mp-fa-log-row__dates { text-align: left; }
}

/* ── First-aid chip states in dark hero ──────────────────────── */
.certify-mp-dark-chip__value--fa-valid {
    color: #86efac;
}

.certify-mp-dark-chip__value--fa-invalid {
    color: #fca5a5;
}

.certify-mp-dark-chip__dot--warn {
    background: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

/* ── Sidebar nav groups ──────────────────────────────────────── */
.certify-mp-nav-group + .certify-mp-nav-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.certify-mp-nav-group__label {
    display: block;
    padding: 6px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000;
    user-select: none;
}

/* Font Awesome icon sizing inside sidebar */
.certify-mp-sidebar__icon i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* ── Workshop create (template picker) ───────────────────────── */
.certify-mp-workshop-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.certify-mp-workshop-template-card {
    display: block;
    cursor: pointer;
    margin: 0;
}

.certify-mp-workshop-template-card__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.certify-mp-workshop-template-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 16px;
    border: 2px solid var(--certify-mp-border, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.certify-mp-workshop-template-card__input:focus-visible + .certify-mp-workshop-template-card__body,
.certify-mp-workshop-template-card__input:checked + .certify-mp-workshop-template-card__body {
    border-color: var(--certify-mp-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.certify-mp-workshop-template-card__cover {
    display: block;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
}

.certify-mp-workshop-template-card__title {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
    color: #111827;
}

.certify-mp-workshop-template-card__subtitle {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
}

.certify-mp-workshop-template-card__meta,
.certify-mp-workshop-template-card__code {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
}

.certify-mp-workshop-template-card__excerpt {
    display: block;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4b5563;
}

.certify-mp-workshop-create-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--certify-mp-border, #e5e7eb);
}

/* Rich text (wp_editor) on workshop form */
.certify-mp-field--editor .wp-editor-wrap {
    max-width: 100%;
}

.certify-mp-field--editor .wp-editor-container {
    border-radius: var(--mp-radius-sm, 8px);
    overflow: hidden;
}

.certify-mp-field--editor .wp-editor-tools {
    padding-top: 4px;
}

/* 牌照續期 */
.certify-mp-alert--warn {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.certify-mp-renew-subjects .certify-mp-quota-plan.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.certify-mp-renew-subjects .certify-mp-quota-plan.is-disabled input {
    cursor: not-allowed;
}

.certify-mp-renew-subject__reason {
    color: var(--mp-muted);
    font-size: 0.875rem;
}

.certify-mp-renew-total {
    margin: 1rem 0 0;
    font-size: 1.05rem;
}

.certify-mp-renew-subjects .certify-mp-quota-plan__body {
    gap: 0.65rem;
}

.certify-mp-renew-subject-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    width: 100%;
}

.certify-mp-renew-qual-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.certify-mp-renew-qual-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0.4rem 0;
    border-top: 1px solid var(--mp-border);
    font-size: 0.8125rem;
    line-height: 1.35;
}

.certify-mp-renew-qual-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.certify-mp-renew-qual-row--empty {
    display: block;
    color: var(--mp-muted);
}

.certify-mp-renew-qual-row__name {
    font-weight: 600;
    color: var(--mp-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certify-mp-renew-qual-row--empty .certify-mp-renew-qual-row__name {
    font-weight: 500;
    white-space: normal;
}

.certify-mp-renew-qual-row__status {
    font-weight: 600;
    color: #15803d;
    white-space: nowrap;
}

.certify-mp-renew-qual-row.is-expired .certify-mp-renew-qual-row__status {
    color: #c2410c;
}

.certify-mp-renew-qual-row__expired {
    color: var(--mp-muted);
    white-space: nowrap;
    text-align: right;
}
