k/* ============================================================
   ActiveScore Listings Table
   Brand: #2A9D8F | Font: Simplon BP / Varela Round / Helvetica
   ============================================================ */

/* --- Container --- */
.as-listing-table {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Simplon BP, Varela Round, Helvetica, sans-serif !important;
    font-size: 0.875rem;
    color: #1a1a2e;
}

/* --- Toolbar --- */
.as-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #f0f9f7;
    border-radius: 10px;
    border: 1px solid #d4ece7;
}

.as-toolbar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.as-search-wrap {
    position: relative;
    flex: 1 1 0;
    min-width: 200px;
}

.as-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #2A9D8F;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}

.as-search {
    width: 100%;
    padding: 7px 10px 7px 36px !important;
    border: 1px solid #d4ece7;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.as-search:focus {
    outline: none;
    border-color: #2A9D8F;
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

.as-search::placeholder {
    color: #a0c4be;
}

.as-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.as-filter {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 24px 7px 8px;
    border: 1px solid #d4ece7;
    border-radius: 8px;
    font-size: 0.78rem;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232A9D8F' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 6px center;
    appearance: none;
    cursor: pointer;
    color: #1a3a36;
    transition: border-color 0.2s;
    text-overflow: ellipsis;
}

.as-filter:focus {
    outline: none;
    border-color: #2A9D8F;
}

.as-count {
    font-size: 0.8rem;
    color: #5a9e94;
    white-space: nowrap;
}

#as-count-num {
    font-weight: 700;
    color: #2A9D8F;
}

/* --- Table --- */
.as-table-wrap {
    border-radius: 12px;
    border: 1px solid #d4ece7;
    background: #fff;
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.08);
    overflow: hidden;
}

.as-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.as-table thead {
    background: linear-gradient(135deg, #2A9D8F 0%, #1B7A6E 100%);
    color: #fff;
}

.as-table th {
    padding: 13px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths */
.as-col-project  { width: 22%; }
.as-col-location { width: 13%; }
.as-col-country  { width: 10%; }
.as-col-type     { width: 11%; }
.as-col-client   { width: 32%; }
.as-col-rating   { width: 12%; }

.as-sortable {
    cursor: pointer;
    transition: background 0.15s;
}

.as-sortable:hover {
    background: rgba(255, 255, 255, 0.12);
}

.as-sort-arrow {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-left: 1px;
}

.as-sortable.sorted-asc .as-sort-arrow,
.as-sortable.sorted-desc .as-sort-arrow {
    opacity: 0.8;
}

.as-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf7f5;
    color: #2d3a38;
    font-size: 0.825rem;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.as-table tbody tr {
    transition: background 0.12s;
}

.as-table tbody tr:nth-child(even) {
    background: #f8fcfa;
}

.as-table tbody tr:hover {
    background: #e6f6f2;
}

.as-table tbody tr.hidden {
    display: none;
}

.as-project {
    font-weight: 600;
    color: #1a2e2b;
}

.as-client {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.as-client:hover {
    cursor: default;
}

/* --- Rating Badges --- */
.as-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.5;
    white-space: nowrap;
}

.as-badge--platinum {
    background: #e8f0fe;
    color: #3b5998;
}

.as-badge--platinum-100 {
    background: #ede9fe;
    color: #5b21b6;
}

.as-badge--gold {
    background: #fef7ed;
    color: #c2780a;
}

.as-badge--silver {
    background: #f1f5f9;
    color: #475569;
}

.as-badge--certified {
    background: #d9f2ed;
    color: #1B7A6E;
}

/* --- States --- */
.as-empty {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 1rem;
}

.as-loading {
    text-align: center;
    padding: 48px 20px;
    color: #2A9D8F;
    font-size: 1rem;
}

.as-error {
    color: #dc2626;
    padding: 16px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .as-toolbar {
        gap: 8px;
    }

    .as-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .as-search-wrap {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .as-filters {
        flex-direction: column;
    }

    .as-filter {
        flex: 0 0 auto;
        width: 100%;
    }

    .as-count {
        text-align: center;
        width: 100%;
    }

    .as-table-wrap {
        overflow-x: auto;
    }

    .as-table {
        table-layout: auto;
        min-width: 700px;
    }

    .as-table th,
    .as-table td {
        padding: 8px 8px;
        font-size: 0.75rem;
    }
}
