/* ============================================================
   DATATABLE — tabella desktop + card mobile
   ============================================================ */

/* ── Toolbar ──────────────────────────────────────────────── */

.dt-wrap { }

.dt-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dt-search {
    max-width: 280px;
}

.dt-count-bar {
    margin-bottom: 8px;
}

.dt-count {
    font-size: 12px;
    color: #aaa;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Tabella desktop ──────────────────────────────────────── */

.dt-table {
    font-size: 13px;
}

.dt-th {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    user-select: none;
}

.dt-sortable {
    cursor: pointer;
}

.dt-sortable:hover {
    background: #f0f4f8;
}

.dt-sorted {
    color: var(--accent, #185FA5);
}

.dt-sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.dt-sorted .dt-sort-icon {
    opacity: 1;
}

/* ── Card mobile (opzione B) ──────────────────────────────── */

.dt-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 0.5px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
}

.dt-card:last-child {
    margin-bottom: 0;
}

.dt-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-light, #E6F1FB);
    color: var(--accent-text, #0C447C);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dt-card-info {
    flex: 1;
    min-width: 0;
}

.dt-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dt-card-sub {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.dt-card-sep {
    margin: 0 4px;
    opacity: 0.4;
}

.dt-card-badges {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.dt-card-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.dt-card-edit,
.dt-card-menu {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ── Paginazione ──────────────────────────────────────────── */

.dt-pagination {
    margin-top: 12px;
}

.dt-pagination-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.dt-pg-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border: 0.5px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.dt-pg-btn:hover:not(.disabled):not(.active) {
    background: #f4f4f4;
}

.dt-pg-btn.active {
    background: var(--accent-light, #E6F1FB);
    color: var(--accent-text, #0C447C);
    border-color: transparent;
    font-weight: 600;
    cursor: default;
}

.dt-pg-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.dt-pg-ellipsis {
    font-size: 12px;
    color: #aaa;
    padding: 0 2px;
    line-height: 30px;
}
