.participant-page {
    /* ปรับเป็น AASP Theme */
    --p-navy: #2D2769;              /* aasp-indigo */
    --p-primary: #D1236B;           /* aasp-primary */
    --p-primary-hover: #A31250;     /* aasp-primary-dark */
    --p-soft: #FDEBF3;              /* aasp-primary-light */
    --p-soft-light: #FFFDF9;        /* aasp-bg-cream */
    --p-border: #E5CDD8;            /* ปรับโทนขอบให้เข้ากับสีชมพู */
    --p-border-light: #F5E6ED;
    --p-text: #1E1A47;              /* aasp-indigo-dark */
    --p-muted: #6B668A;             /* ปรับสีเทาให้กลืนกับ indigo */
    color: var(--p-text);
}
.participant-title { color: var(--p-navy); font-size: clamp(28px, 3vw, 36px); font-weight: 600; line-height: 1.3; text-align: center; }

/* Tabs */
.participant-tabs-wrapper {
    width: 100%; margin-top: 24px; overflow-x: auto; overflow-y: hidden;
    border-bottom: 1px solid var(--p-border); scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.participant-tabs-wrapper::-webkit-scrollbar { display: none; }
.participant-tabs {
    display: flex; flex-wrap: nowrap; gap: 0; width: max-content; min-width: 100%;
    margin: 0!important; padding: 0; border: 0; list-style: none;
}
.participant-tabs .nav-item { flex: 0 0 auto; margin: 0; padding: 0; }
.participant-tabs .nav-link {
    display: flex; align-items: center; justify-content: center; min-height: 46px;
    padding: 11px 20px; color: var(--p-navy); background: #fff;
    border: 1px solid var(--p-border); border-bottom: 0; border-radius: 10px 10px 0 0;
    font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap; cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.participant-tabs .nav-item+.nav-item .nav-link { margin-left: -1px; }
.participant-tabs .nav-link:hover { color: var(--p-primary); background: var(--p-soft); border-color: var(--p-border); }
.participant-tabs .nav-link.active { position: relative; z-index: 2; color: #fff; background: var(--p-primary); border-color: var(--p-primary); box-shadow: none; }
.participant-tabs .nav-link:focus,
.participant-tabs .nav-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209, 35, 107, .12); } /* aasp-primary-rgb */

.participant-tab-content { width: 100%; padding-top: 28px; }

/* Table */
.participant-table-wrapper {
    width: 100%; overflow: hidden; background: #fff; border: 1px solid var(--p-border);
    border-radius: 14px; box-shadow: 0 3px 14px rgba(45, 39, 105, .03); /* อิงจากสี indigo */
}
.participant-table {
    width: 100%; margin: 0!important; color: var(--p-text); background: #fff;
    border-collapse: separate; border-spacing: 0; table-layout: fixed;
}
.participant-table thead th {
    padding: 16px 18px; color: var(--p-navy); background: var(--p-soft); border: 0;
    border-right: 1px solid var(--p-border-dark); border-bottom: 1px solid var(--p-border-dark);
    font-size: 13px; font-weight: 700; line-height: 1.4; text-align: center; vertical-align: middle;
}
.participant-table thead th:last-child { border-right: 0; }
.participant-table thead th:nth-child(1) { width: 27%; }
.participant-table thead th:nth-child(2) { width: 46%; }
.participant-table thead th:nth-child(3) { width: 27%; }
.participant-table tbody td {
    padding: 16px 18px; color: var(--p-text); background: #fff; border: 0;
    border-right: 1px solid var(--p-border-light); border-bottom: 1px solid var(--p-border-light);
    font-size: 14px; font-weight: 400; line-height: 1.6; vertical-align: middle; transition: background .2s ease;
}
.participant-table tbody td:last-child { border-right: 0; }
.participant-table tbody tr:last-child td { border-bottom: 0; }
.participant-table tbody tr:not(.participant-empty-row):nth-child(even) td { background: #FFFDF9; } /* สี aasp-bg-cream (Zebra Stripe) */
.participant-table tbody tr:not(.participant-empty-row):hover td { background: #FFF5F9; } /* สีชมพูอ่อนเมื่อ hover */
.participant-code { color: var(--p-primary)!important; font-weight: 700!important; text-align: center; word-break: break-word; }
.participant-name { color: var(--p-navy)!important; font-weight: 500!important; text-align: left; }
.participant-date { color: var(--p-muted)!important; text-align: center; white-space: nowrap; }

/* Empty Row */
.participant-empty-row td { background: #fff!important; border-right: 0!important; border-bottom: 0!important; }
.participant-empty-row:hover td { background: #fff!important; }
.participant-empty { height: 230px; padding: 45px 20px!important; text-align: center; }
.participant-empty-box { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.participant-empty-icon {
    display: flex; align-items: center; justify-content: center; width: 60px; height: 60px;
    margin: 0 auto 15px; color: var(--p-primary); background: var(--p-soft); border-radius: 50%;
}
.participant-empty-icon svg { width: 26px; height: 26px; stroke: currentColor; }
.participant-empty-title { margin-bottom: 5px; color: var(--p-navy); font-size: 16px; font-weight: 700; line-height: 1.5; }
.participant-empty-text { color: var(--p-muted); font-size: 14px; line-height: 1.6; }

/* Responsive */
@media(max-width:991.98px) {
    .participant-tabs-wrapper { margin-top: 20px; }
    .participant-tabs .nav-link { min-height: 44px; padding: 10px 17px; font-size: 13px; }
    .participant-tab-content { padding-top: 24px; }
    .participant-table thead th, .participant-table tbody td { padding: 14px 15px; }
}
@media(max-width:767.98px) {
    .participant-title { font-size: 27px; }
    .participant-tabs-wrapper { margin-top: 18px; overflow-x: auto; }
    .participant-tabs { width: max-content; min-width: 100%; }
    .participant-tabs .nav-link { min-height: 42px; padding: 9px 14px; border-radius: 8px 8px 0 0; font-size: 12px; }
    .participant-tab-content { padding-top: 20px; }
    .participant-table-wrapper { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
    .participant-table, .participant-table tbody { display: block; width: 100%; background: transparent; }
    .participant-table thead { display: none; }
    .participant-table tbody tr:not(.participant-empty-row) {
        display: block; width: 100%; margin-bottom: 12px; overflow: hidden; background: #fff;
        border: 1px solid var(--p-border); border-radius: 12px; box-shadow: 0 3px 12px rgba(45, 39, 105, .04);
    }
    .participant-table tbody tr:not(.participant-empty-row):last-child { margin-bottom: 0; }
    .participant-table tbody tr:not(.participant-empty-row) td {
        position: relative; display: flex; align-items: flex-start; width: 100%; min-height: 50px;
        padding: 13px 14px 13px 43%; background: #fff!important; border: 0;
        border-bottom: 1px solid var(--p-border-light); font-size: 13px; text-align: left!important; white-space: normal;
    }
    .participant-table tbody tr:not(.participant-empty-row) td:last-child { border-bottom: 0; }
    .participant-table tbody tr:not(.participant-empty-row) td::before {
        content: attr(data-label); position: absolute; top: 13px; left: 14px; width: calc(43% - 22px);
        color: var(--p-muted); font-size: 10px; font-weight: 700; line-height: 1.5;
        letter-spacing: .2px; text-transform: uppercase;
    }
    .participant-empty-row {
        display: block; width: 100%; overflow: hidden; background: #fff;
        border: 1px solid var(--p-border); border-radius: 12px;
    }
    .participant-empty-row td { display: block; width: 100%; height: auto; padding: 48px 15px!important; background: #fff!important; border: 0!important; }
    .participant-empty-row td::before { display: none!important; }
    .participant-empty-icon { width: 54px; height: 54px; margin-bottom: 13px; }
    .participant-empty-title { font-size: 15px; }
    .participant-empty-text { font-size: 13px; }
}
@media(max-width:480px) {
    .participant-title { font-size: 24px; }
    .participant-tabs .nav-link { padding: 9px 12px; font-size: 11px; }
    .participant-table tbody tr:not(.participant-empty-row) td { padding-left: 44%; font-size: 12px; }
    .participant-table tbody tr:not(.participant-empty-row) td::before { width: calc(44% - 22px); font-size: 9px; }
}