.coedpi-ld-box {
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    color: #444;
}

.coedpi-ld-wrap {
    width: 100%;
}

.coedpi-ld-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}

.coedpi-ld-summary > .coedpi-ld-card {
    min-width: 0;
}

.coedpi-ld-summary--students {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 767px) {
    .coedpi-ld-summary {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1024px) {
    .coedpi-ld-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.coedpi-ld-card {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 18px;
    padding: 18px 20px 16px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.coedpi-ld-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.coedpi-ld-card__label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0;
}

.coedpi-ld-card__value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
}

.coedpi-ld-card__subtitle {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.coedpi-ld-card__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.coedpi-ld-card__pill--distinct {
    background: #eef2ff;
    color: #4338ca;
}

.coedpi-ld-controls {
    margin: 0 0 18px;
}

.coedpi-ld-deferred {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.coedpi-ld-deferred__text {
    margin: 0 0 8px;
    color: #334155;
}

.coedpi-ld-controls__card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.coedpi-ld-controls__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: center;
}

.coedpi-ld-controls__grid--single {
    margin-top: 14px;
}

.coedpi-ld-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.coedpi-ld-field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.coedpi-ld-field input,
.coedpi-ld-field select {
    width: 100%;
    padding: 12px 16px;
    min-height: 44px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.coedpi-ld-field input::placeholder {
    color: #667085;
}

.coedpi-ld-field input:focus,
.coedpi-ld-field select:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.coedpi-ld-field--wide {
    grid-column: span 2;
}

.coedpi-ld-field--full {
    grid-column: 1 / -1;
}

.coedpi-ld-kpi-note {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
}


.coedpi-ld-counter {
    margin: 6px 0 12px;
    color: #555;
    font-size: 14px;
}

.coedpi-ld-tablewrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.coedpi-ld-tablewrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    background: #ffffff;
    border: 1px solid #eef1f4;
    border-radius: 14px;
    overflow: hidden;
}

.coedpi-ld-tablewrap th,
.coedpi-ld-tablewrap td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
    text-align: left;
    vertical-align: top;
}

.coedpi-ld-tablewrap thead th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.coedpi-ld-tablewrap thead th .coedpi-ld-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: flex-start;
    font: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.coedpi-ld-tablewrap thead th .coedpi-ld-sort__icon {
    font-size: 12px;
    line-height: 1;
    color: #475569;
    min-width: 10px;
}

.coedpi-ld-tablewrap thead th .coedpi-ld-sort.is-asc .coedpi-ld-sort__icon,
.coedpi-ld-tablewrap thead th .coedpi-ld-sort.is-desc .coedpi-ld-sort__icon {
    color: #0f172a;
    font-weight: 700;
}

.coedpi-ld-tablewrap tbody tr:nth-child(even) {
    background: #f9fafb;
}

.coedpi-ld-tablewrap tbody tr:hover {
    background: #eef2f7;
}

.coedpi-ld-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid transparent;
    font-weight: 600;
}

.coedpi-ld-pill--leader {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

tr.is-leader {
    background: #fff7df;
}

tr.is-leader td:first-child {
    border-left: 4px solid #e5c04d;
}

.coedpi-email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.coedpi-email-icon {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 1024px) {
    .coedpi-email-text {
        display: none;
    }
}

.coedpi-ld-pill.status-not-started {
    background: #ffffff;
    border-color: #d0d0d0;
    color: #2b2b2b;
}

.coedpi-ld-pill.status-in-progress {
    background: #fff1d6;
    border-color: #f1c27a;
    color: #5a3a00;
}

.coedpi-ld-pill.status-completed {
    background: #dff5e6;
    border-color: #7cc79a;
    color: #0f3d22;
}

.coedpi-ld-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.coedpi-ld-pagination button,
.coedpi-ld-pagination a.coedpi-ld-page {
    padding: 8px 12px;
    color: #333;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    line-height: 1;
}

.coedpi-ld-pagination button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.coedpi-ld-pagination a.coedpi-ld-page.is-active {
    border-color: #333;
    background: #f2f2f2;
    font-weight: 700;
    cursor: default;
}

.coedpi-ld-pagination .coedpi-ld-pageinfo {
    font-weight: 700;
    color: #333;
    padding: 6px 10px;
    border-radius: 10px;
    background: #f7f7f7;
    border: 1px solid #eee;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .coedpi-ld-summary {
        grid-template-columns: 1fr;
    }

    .coedpi-ld-controls__grid {
        grid-template-columns: 1fr;
    }

    .coedpi-ld-field--wide {
        grid-column: span 1;
    }

    .coedpi-ld-tablewrap table {
        min-width: 640px;
    }
}
